mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Make product eval-at-once.
* Make product EvalAtOnce in cases OuterProduct, GemmProduct and GemvProduct * Ensure that product evaluators are nested inside EvalToTemp evaluator * As temporary kludge, evaluate expression to temporary in AllAtOnce traversal and pass expression operator to evalTo()
This commit is contained in:
@@ -65,6 +65,11 @@ void test_evaluators()
|
||||
VERIFY_IS_APPROX_EVALUATOR2(d, s * prod(a,b), s * a*b);
|
||||
VERIFY_IS_APPROX_EVALUATOR2(d, prod(a,b).transpose(), (a*b).transpose());
|
||||
VERIFY_IS_APPROX_EVALUATOR2(d, prod(a,b) + prod(b,c), a*b + b*c);
|
||||
|
||||
// check that prod works even with aliasing present
|
||||
c = a*a;
|
||||
copy_using_evaluator(a, prod(a,a));
|
||||
VERIFY_IS_APPROX(a,c);
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user