From afbd73b5cdc1ce9b8ae54e9dd08332c870cf54d2 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 11 Aug 2009 15:15:06 +0200 Subject: overload operartor* with a ProductBase such that "scalar * (mat * mat)" is optimized as one could naturally expect --- test/product_symm.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/product_symm.cpp') diff --git a/test/product_symm.cpp b/test/product_symm.cpp index 88bac878b..1300928a2 100644 --- a/test/product_symm.cpp +++ b/test/product_symm.cpp @@ -94,6 +94,11 @@ template void symm(int size = Size, in VERIFY_IS_APPROX(rhs12 = (s1*m2.adjoint()).template selfadjointView() * (s2*rhs3).conjugate(), rhs13 = (s1*m1.adjoint()) * (s2*rhs3).conjugate()); + + m2 = m1.template triangularView(); rhs13 = rhs12; + VERIFY_IS_APPROX(rhs12 += (s1 * ((m2.adjoint()).template selfadjointView() * (s2*rhs3).conjugate())).lazy(), + rhs13 += (s1*m1.adjoint()) * (s2*rhs3).conjugate()); + // test matrix * selfadjoint symm_extra::run(m1,m2,rhs2,rhs22,rhs23,s1,s2); -- cgit v1.2.3