diff --git a/Eigen/src/Core/Assign.h b/Eigen/src/Core/Assign.h index 0a6c46eca..9440cebf1 100644 --- a/Eigen/src/Core/Assign.h +++ b/Eigen/src/Core/Assign.h @@ -389,7 +389,7 @@ template <> struct ei_unaligned_assign_impl { // MSVC must not inline this functions. If it does, it fails to optimize the - // packet access path. + // packet access path. #ifdef _MSC_VER template static EIGEN_DONT_INLINE void run(const Derived& src, OtherDerived& dst, int start, int end) @@ -415,7 +415,7 @@ struct ei_assign_impl::DstIsAligned!=0>::run(src,dst,0,alignedStart); - + for(int index = alignedStart; index < alignedEnd; index += packetSize) { dst.template copyPacket::SrcAlignment>(index, src); diff --git a/Eigen/src/Core/products/CoeffBasedProduct.h b/Eigen/src/Core/products/CoeffBasedProduct.h index a772b9ec8..c9d333072 100644 --- a/Eigen/src/Core/products/CoeffBasedProduct.h +++ b/Eigen/src/Core/products/CoeffBasedProduct.h @@ -86,9 +86,9 @@ struct ei_traits > | (CanVectorizeLhs || CanVectorizeRhs ? PacketAccessBit : 0) | (LhsFlags & RhsFlags & AlignedBit), - CoeffReadCost = 1000,//InnerSize == Dynamic ? Dynamic -// : InnerSize * (NumTraits::MulCost + LhsCoeffReadCost + RhsCoeffReadCost) -// + (InnerSize - 1) * NumTraits::AddCost, + CoeffReadCost = InnerSize == Dynamic ? Dynamic + : InnerSize * (NumTraits::MulCost + LhsCoeffReadCost + RhsCoeffReadCost) + + (InnerSize - 1) * NumTraits::AddCost, /* CanVectorizeInner deserves special explanation. It does not affect the product flags. It is not used outside * of Product. If the Product itself is not a packet-access expression, there is still a chance that the inner @@ -178,7 +178,7 @@ class CoeffBasedProduct // Implicit convertion to the nested type (trigger the evaluation of the product) operator const PlainMatrixType& () const { - m_result = *this; + m_result.lazyAssign(*this); return m_result; }