mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
overload operartor* with a ProductBase such that "scalar * (mat * mat)" is optimized
as one could naturally expect
This commit is contained in:
@@ -94,6 +94,11 @@ template<typename Scalar, int Size, int OtherSize> void symm(int size = Size, in
|
||||
VERIFY_IS_APPROX(rhs12 = (s1*m2.adjoint()).template selfadjointView<LowerTriangular>() * (s2*rhs3).conjugate(),
|
||||
rhs13 = (s1*m1.adjoint()) * (s2*rhs3).conjugate());
|
||||
|
||||
|
||||
m2 = m1.template triangularView<UpperTriangular>(); rhs13 = rhs12;
|
||||
VERIFY_IS_APPROX(rhs12 += (s1 * ((m2.adjoint()).template selfadjointView<LowerTriangular>() * (s2*rhs3).conjugate())).lazy(),
|
||||
rhs13 += (s1*m1.adjoint()) * (s2*rhs3).conjugate());
|
||||
|
||||
// test matrix * selfadjoint
|
||||
symm_extra<OtherSize>::run(m1,m2,rhs2,rhs22,rhs23,s1,s2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user