mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-01-18 14:34:17 +08:00
Michael was right, it's best to base the unrolling limit on the product Rows*Cols.
This commit is contained in:
parent
656919619f
commit
6015698047
@ -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++)
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user