mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-17 20:03:17 +08:00
Make products always eval into expressions. Improves performance
in benchmark. Still not as fasts as explicit eval(), strangely.
This commit is contained in:
parent
ef5b20bc50
commit
890a8de962
@ -114,6 +114,7 @@ Derived& MatrixBase<Derived>
|
||||
{
|
||||
// std::cout << typeid(OtherDerived).name() << "\n";
|
||||
// std::cout << "lazyAssign = " << (Derived::Flags&VectorizableBit) << " " << (OtherDerived::Flags&VectorizableBit) << "\n";
|
||||
// std::cout << __PRETTY_FUNCTION__ << std::endl;
|
||||
ei_assignment_impl<Derived, OtherDerived>::execute(derived(),other.derived());
|
||||
return derived();
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ struct ei_traits<Product<Lhs, Rhs, EvalMode> >
|
||||
| ((RowsAtCompileTime == Dynamic || ColsAtCompileTime == Dynamic) ? 0 : LargeBit)),
|
||||
Flags = ((unsigned int)(LhsFlags | RhsFlags) & _LostBits)
|
||||
| EvalBeforeAssigningBit
|
||||
| ((int)EvalMode == (int)CacheOptimalProduct ? EvalBeforeNestingBit : 0)
|
||||
| EvalBeforeNestingBit
|
||||
| (_Vectorizable ? VectorizableBit : 0),
|
||||
CoeffReadCost
|
||||
= Lhs::ColsAtCompileTime == Dynamic
|
||||
|
@ -39,7 +39,7 @@ int main(int argc, char *argv[])
|
||||
asm("#begin");
|
||||
for(int a = 0; a < REPEAT; a++)
|
||||
{
|
||||
m = I + 0.00005 * (m + m*m);
|
||||
m = Matrix<SCALAR,MATSIZE,MATSIZE>::ones() + 0.00005 * (m + m*m);
|
||||
}
|
||||
asm("#end");
|
||||
cout << m << endl;
|
||||
|
Loading…
x
Reference in New Issue
Block a user