Michael was right, it's best to base the unrolling limit on the product Rows*Cols.

This commit is contained in:
Benoit Jacob
2007-10-01 06:30:20 +00:00
parent 656919619f
commit 6015698047
2 changed files with 2 additions and 4 deletions

View File

@@ -66,9 +66,7 @@ template<typename Scalar, typename Derived> class EiObject
template<typename OtherDerived>
void _copy_helper(const EiObject<Scalar, OtherDerived>& other)
{
if(HasDynamicSize
&& RowsAtCompileTime <= EI_LOOP_UNROLLING_LIMIT
&& ColsAtCompileTime <= EI_LOOP_UNROLLING_LIMIT)
if(UnrollCount > 0 && UnrollCount <= EI_LOOP_UNROLLING_LIMIT)
EiLoop<UnrollCount, RowsAtCompileTime>::copy(*this, other);
else
for(int i = 0; i < rows(); i++)