mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
add regression test for aliasing in product rewritting
This commit is contained in:
@@ -216,6 +216,8 @@ template<typename MatrixType> void product(const MatrixType& m)
|
|||||||
// CwiseBinaryOp
|
// CwiseBinaryOp
|
||||||
VERIFY_IS_APPROX(x = y + A*x, A*z);
|
VERIFY_IS_APPROX(x = y + A*x, A*z);
|
||||||
x = z;
|
x = z;
|
||||||
|
VERIFY_IS_APPROX(x = y - A*x, A*(-z));
|
||||||
|
x = z;
|
||||||
// CwiseUnaryOp
|
// CwiseUnaryOp
|
||||||
VERIFY_IS_APPROX(x = Scalar(1.)*(A*x), A*z);
|
VERIFY_IS_APPROX(x = Scalar(1.)*(A*x), A*z);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user