Commits

Gael Guennebaud committed 00bfcca

fix sparse time dense product with a rowmajor lhs

  • Participants
  • Parent commits e5c98ba

Comments (0)

Files changed (1)

Eigen/src/Sparse/SparseDenseProduct.h

       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)
         {