From 6015698047e24808c68f1d1e0d2a8d355011ea20 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Mon, 1 Oct 2007 06:30:20 +0000 Subject: [PATCH] Michael was right, it's best to base the unrolling limit on the product Rows*Cols. --- src/internal/Object.h | 4 +--- src/internal/Util.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/internal/Object.h b/src/internal/Object.h index bbd6458de..3f27e6c0e 100644 --- a/src/internal/Object.h +++ b/src/internal/Object.h @@ -66,9 +66,7 @@ template class EiObject template void _copy_helper(const EiObject& other) { - if(HasDynamicSize - && RowsAtCompileTime <= EI_LOOP_UNROLLING_LIMIT - && ColsAtCompileTime <= EI_LOOP_UNROLLING_LIMIT) + if(UnrollCount > 0 && UnrollCount <= EI_LOOP_UNROLLING_LIMIT) EiLoop::copy(*this, other); else for(int i = 0; i < rows(); i++) diff --git a/src/internal/Util.h b/src/internal/Util.h index 60413a8af..e4c9a9e57 100644 --- a/src/internal/Util.h +++ b/src/internal/Util.h @@ -69,7 +69,7 @@ struct EiForwardDecl > const int EiDynamic = -1; -#define EI_LOOP_UNROLLING_LIMIT 8 +#define EI_LOOP_UNROLLING_LIMIT 25 #define EI_UNUSED(x) (void)x