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

View File

@ -69,7 +69,7 @@ struct EiForwardDecl<EiMatrix<_Scalar, _Rows, _Cols> >
const int EiDynamic = -1; const int EiDynamic = -1;
#define EI_LOOP_UNROLLING_LIMIT 8 #define EI_LOOP_UNROLLING_LIMIT 25
#define EI_UNUSED(x) (void)x #define EI_UNUSED(x) (void)x