diff options
author | Gael Guennebaud <g.gael@free.fr> | 2014-02-18 17:43:16 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2014-02-18 17:43:16 +0100 |
commit | 5b78780deffd4a5728cfc6ae5371f56e038e2ac0 (patch) | |
tree | 8a09f0007ed1a65a0ecd170e575aa3500c918f1b /Eigen/src/Core/products | |
parent | 8169c6ac59ce78a7340ebae40f8eabe9df1c8f62 (diff) |
Add evaluator shortcut for triangular ?= product
Diffstat (limited to 'Eigen/src/Core/products')
-rw-r--r-- | Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h b/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h index 87bd36bc3..46be46f85 100644 --- a/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h +++ b/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h @@ -264,6 +264,16 @@ struct general_product_to_triangular_selector<MatrixType,ProductType,UpLo,false> } }; +#ifdef EIGEN_TEST_EVALUATORS +template<typename MatrixType, unsigned int UpLo> +template<typename ProductType> +TriangularView<MatrixType,UpLo>& TriangularView<MatrixType,UpLo>::_assignProduct(const ProductType& prod, const Scalar& alpha) +{ + general_product_to_triangular_selector<MatrixType, ProductType, UpLo, internal::traits<ProductType>::InnerSize==1>::run(m_matrix.const_cast_derived(), prod, alpha); + + return *this; +} +#else template<typename MatrixType, unsigned int UpLo> template<typename ProductDerived, typename _Lhs, typename _Rhs> TriangularView<MatrixType,UpLo>& TriangularView<MatrixType,UpLo>::assignProduct(const ProductBase<ProductDerived, _Lhs,_Rhs>& prod, const Scalar& alpha) @@ -272,7 +282,7 @@ TriangularView<MatrixType,UpLo>& TriangularView<MatrixType,UpLo>::assignProduct( return *this; } - +#endif } // end namespace Eigen #endif // EIGEN_GENERAL_MATRIX_MATRIX_TRIANGULAR_H |