From 478bfaf2288fb4994873b0b12191b497d0fa3508 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Mon, 16 Jun 2008 11:18:59 +0000 Subject: [PATCH] fix bug in computation of unrolling limit: div instead of mul --- Eigen/src/Core/Assign.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Eigen/src/Core/Assign.h b/Eigen/src/Core/Assign.h index 9dc7a3cf3..5a3fb2260 100644 --- a/Eigen/src/Core/Assign.h +++ b/Eigen/src/Core/Assign.h @@ -73,7 +73,7 @@ public: private: enum { - UnrollingLimit = EIGEN_UNROLLING_LIMIT / (int(Vectorization) == int(NoVectorization) ? 1 : int(PacketSize)), + UnrollingLimit = EIGEN_UNROLLING_LIMIT * int(PacketSize), MayUnrollCompletely = int(Derived::SizeAtCompileTime) * int(OtherDerived::CoeffReadCost) <= int(UnrollingLimit), MayUnrollInner = int(InnerSize * OtherDerived::CoeffReadCost) <= int(UnrollingLimit) }; @@ -238,7 +238,7 @@ template struct ei_assign_impl { static void run(Derived1 &dst, const Derived2 &src) - { + { const bool rowMajor = int(Derived1::Flags)&RowMajorBit; const int innerSize = rowMajor ? Derived1::ColsAtCompileTime : Derived1::RowsAtCompileTime; const int outerSize = rowMajor ? dst.rows() : dst.cols();