From bec3f9bfe49c0c6c1d2b8d4c2f22a4893f8a5d55 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Thu, 22 Jul 2010 13:17:39 +0200 Subject: rename indices to a common scheme --- Eigen/src/Core/products/GeneralMatrixVector.h | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/Eigen/src/Core/products/GeneralMatrixVector.h b/Eigen/src/Core/products/GeneralMatrixVector.h index 4d2f82680..a5062bedb 100644 --- a/Eigen/src/Core/products/GeneralMatrixVector.h +++ b/Eigen/src/Core/products/GeneralMatrixVector.h @@ -91,7 +91,7 @@ EIGEN_DONT_INLINE static void run( const Index ResPacketAlignedMask = ResPacketSize-1; const Index PeelAlignedMask = ResPacketSize*peels-1; const Index size = rows; - + // How many coeffs of the result do we have to skip to be aligned. // Here we assume data are at least aligned on the base scalar type. Index alignedStart = ei_first_aligned(res,size); @@ -244,30 +244,29 @@ EIGEN_DONT_INLINE static void run( Index start = columnBound; do { - for (Index i=start; i(alpha*rhs[i*rhsIncr]); - const LhsScalar* lhs0 = lhs + i*lhsStride; + RhsPacket ptmp0 = ei_pset1(alpha*rhs[k*rhsIncr]); + const LhsScalar* lhs0 = lhs + k*lhsStride; if (Vectorizable) { /* explicit vectorization */ // process first unaligned result's coeffs for (Index j=0; j(&lhs0[j]), ptmp0, ei_pload(&res[j]))); + for (Index i = alignedStart;i(&lhs0[i]), ptmp0, ei_pload(&res[i]))); else - for (Index j = alignedStart;j(&lhs0[j]), ptmp0, ei_pload(&res[j]))); + for (Index i = alignedStart;i(&lhs0[i]), ptmp0, ei_pload(&res[i]))); } // process remaining scalars (or all if no explicit vectorization) - for (Index j=alignedSize; j