fix row cwise-prod column in coeff based products...

I really don't know why this worked so far...
This commit is contained in:
Gael Guennebaud 2010-07-07 10:52:59 +02:00
parent 55495dcbae
commit c851044eae

View File

@ -318,7 +318,7 @@ struct ei_product_coeff_vectorized_dyn_selector
typedef typename Lhs::Index Index;
EIGEN_STRONG_INLINE static void run(Index row, Index col, const Lhs& lhs, const Rhs& rhs, typename Lhs::Scalar &res)
{
res = lhs.row(row).cwiseProduct(rhs.col(col)).sum();
res = lhs.row(row).transpose().cwiseProduct(rhs.col(col)).sum();
}
};
@ -330,7 +330,7 @@ struct ei_product_coeff_vectorized_dyn_selector<Lhs,Rhs,1,RhsCols>
typedef typename Lhs::Index Index;
EIGEN_STRONG_INLINE static void run(Index /*row*/, Index col, const Lhs& lhs, const Rhs& rhs, typename Lhs::Scalar &res)
{
res = lhs.cwiseProduct(rhs.col(col)).sum();
res = lhs.transpose().cwiseProduct(rhs.col(col)).sum();
}
};
@ -340,7 +340,7 @@ struct ei_product_coeff_vectorized_dyn_selector<Lhs,Rhs,LhsRows,1>
typedef typename Lhs::Index Index;
EIGEN_STRONG_INLINE static void run(Index row, Index /*col*/, const Lhs& lhs, const Rhs& rhs, typename Lhs::Scalar &res)
{
res = lhs.row(row).cwiseProduct(rhs).sum();
res = lhs.row(row).transpose().cwiseProduct(rhs).sum();
}
};
@ -350,7 +350,7 @@ struct ei_product_coeff_vectorized_dyn_selector<Lhs,Rhs,1,1>
typedef typename Lhs::Index Index;
EIGEN_STRONG_INLINE static void run(Index /*row*/, Index /*col*/, const Lhs& lhs, const Rhs& rhs, typename Lhs::Scalar &res)
{
res = lhs.cwiseProduct(rhs).sum();
res = lhs.transpose().cwiseProduct(rhs).sum();
}
};