aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/product_trmm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/product_trmm.cpp')
-rw-r--r--test/product_trmm.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/product_trmm.cpp b/test/product_trmm.cpp
index c7594e512..2bb4b9e47 100644
--- a/test/product_trmm.cpp
+++ b/test/product_trmm.cpp
@@ -76,8 +76,18 @@ void trmm(int rows=get_random_size<Scalar>(),
VERIFY_IS_APPROX( ge_xs = (s1*mat).adjoint().template triangularView<Mode>() * ge_left.adjoint(), numext::conj(s1) * triTr.conjugate() * ge_left.adjoint());
VERIFY_IS_APPROX( ge_xs = (s1*mat).transpose().template triangularView<Mode>() * ge_left.adjoint(), s1triTr * ge_left.adjoint());
-
// TODO check with sub-matrix expressions ?
+
+ // destination with a non-default inner-stride
+ // see bug 1741
+ {
+ VERIFY_IS_APPROX( ge_xs.noalias() = mat.template triangularView<Mode>() * ge_right, tri * ge_right);
+ typedef Matrix<Scalar,Dynamic,Dynamic> MatrixX;
+ MatrixX buffer(2*ge_xs.rows(),2*ge_xs.cols());
+ Map<ResXS,0,Stride<Dynamic,2> > map1(buffer.data(),ge_xs.rows(),ge_xs.cols(),Stride<Dynamic,2>(2*ge_xs.outerStride(),2));
+ buffer.setZero();
+ VERIFY_IS_APPROX( map1.noalias() = mat.template triangularView<Mode>() * ge_right, tri * ge_right);
+ }
}
template<typename Scalar, int Mode, int TriOrder>