Fix scalar * product optimization when 'product' includes a selfadjoint matrix

This commit is contained in:
Gael Guennebaud
2014-02-17 19:00:45 +01:00
parent d595fd31f5
commit 873401032b
2 changed files with 15 additions and 0 deletions

View File

@@ -132,6 +132,13 @@ template<typename _MatrixType, unsigned int UpLo> class SelfAdjointView
{
return Product<OtherDerived,SelfAdjointView>(lhs.derived(),rhs);
}
friend EIGEN_DEVICE_FUNC
const SelfAdjointView<const CwiseUnaryOp<internal::scalar_multiple_op<Scalar>,MatrixType>,UpLo>
operator*(const Scalar& s, const SelfAdjointView& mat)
{
return (s*mat.nestedExpression()).template selfadjointView<UpLo>();
}
#else // EIGEN_TEST_EVALUATORS