Enable direct access for NestByValue.

This commit is contained in:
Antonio Sánchez
2022-12-07 18:21:45 +00:00
committed by Rasmus Munk Larsen
parent b59f18b4f7
commit 03c9b4738c
2 changed files with 16 additions and 0 deletions

View File

@@ -33,5 +33,7 @@ EIGEN_DECLARE_TEST(nestbyvalue)
MatrixXd b = x;
VERIFY_IS_EQUAL(nb_temporaries,6+1);
VERIFY_IS_APPROX(b, a.rowwise().reverse().eval() + (a+a).eval());
// Block expressions work with dense NestByValue.
VERIFY_IS_APPROX(b, a.nestByValue().rowwise().reverse().eval() + (a.nestByValue()+a.nestByValue()).eval());
}
}