mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
bug #1741: fix SelfAdjointView::rankUpdate and product to triangular part for destination with non-trivial inner stride
This commit is contained in:
@@ -82,6 +82,16 @@ template<typename Scalar> void mmtr(int size)
|
||||
ref2.template triangularView<Lower>() = ref1.template triangularView<Lower>();
|
||||
matc.template triangularView<Lower>() = sqc * matc * sqc.adjoint();
|
||||
VERIFY_IS_APPROX(matc, ref2);
|
||||
|
||||
// destination with a non-default inner-stride
|
||||
// see bug 1741
|
||||
{
|
||||
typedef Matrix<Scalar,Dynamic,Dynamic> MatrixX;
|
||||
MatrixX buffer(2*size,2*size);
|
||||
Map<MatrixColMaj,0,Stride<Dynamic,Dynamic> > map1(buffer.data(),size,size,Stride<Dynamic,Dynamic>(2*size,2));
|
||||
buffer.setZero();
|
||||
CHECK_MMTR(map1, Lower, = s*soc*sor.adjoint());
|
||||
}
|
||||
}
|
||||
|
||||
EIGEN_DECLARE_TEST(product_mmtr)
|
||||
|
||||
Reference in New Issue
Block a user