mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-22 01:29:35 +08:00
add regression test for aliasing in product rewritting
This commit is contained in:
parent
8640093af1
commit
723a59ac26
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user