fix sparse time dense product with a rowmajor lhs

This commit is contained in:
Gael Guennebaud 2010-12-31 17:11:17 +01:00
parent 13867c15cc
commit 25efcdd042

View File

@ -169,7 +169,7 @@ class SparseTimeDenseProduct
enum { LhsIsRowMajor = (_Lhs::Flags&RowMajorBit)==RowMajorBit };
for(Index j=0; j<m_lhs.outerSize(); ++j)
{
typename Rhs::Scalar rhs_j = alpha * m_rhs.coeff(j,0);
typename Rhs::Scalar rhs_j = alpha * m_rhs.coeff(LhsIsRowMajor ? 0 : j,0);
Block<Dest,1,Dest::ColsAtCompileTime> dest_j(dest.row(LhsIsRowMajor ? j : 0));
for(LhsInnerIterator it(m_lhs,j); it ;++it)
{