From c06e6fd115d747c42a2b2ea029c53bbdf41276d6 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 10 Sep 2019 23:29:52 +0200 Subject: bug #1741: fix SelfAdjointView::rankUpdate and product to triangular part for destination with non-trivial inner stride --- test/product_mmtr.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/product_mmtr.cpp') diff --git a/test/product_mmtr.cpp b/test/product_mmtr.cpp index bb19e6e52..8f8c5fe1f 100644 --- a/test/product_mmtr.cpp +++ b/test/product_mmtr.cpp @@ -82,6 +82,16 @@ template void mmtr(int size) ref2.template triangularView() = ref1.template triangularView(); matc.template triangularView() = sqc * matc * sqc.adjoint(); VERIFY_IS_APPROX(matc, ref2); + + // destination with a non-default inner-stride + // see bug 1741 + { + typedef Matrix MatrixX; + MatrixX buffer(2*size,2*size); + Map > map1(buffer.data(),size,size,Stride(2*size,2)); + buffer.setZero(); + CHECK_MMTR(map1, Lower, = s*soc*sor.adjoint()); + } } EIGEN_DECLARE_TEST(product_mmtr) -- cgit v1.2.3