diff options
author | Gael Guennebaud <g.gael@free.fr> | 2014-02-18 10:52:26 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2014-02-18 10:52:26 +0100 |
commit | 551bf5c66a3f29c8ac1f24f8439a6b85d0da79ac (patch) | |
tree | e7c6aee28a115b28775a575cd35c65aa48edccbd /Eigen | |
parent | 2d136d3d7f0623189e42be44d45e1353d1cde93e (diff) |
Get rid of DiagonalProduct
Diffstat (limited to 'Eigen')
-rw-r--r-- | Eigen/src/Core/DiagonalProduct.h | 12 | ||||
-rw-r--r-- | Eigen/src/Core/MatrixBase.h | 7 |
2 files changed, 19 insertions, 0 deletions
diff --git a/Eigen/src/Core/DiagonalProduct.h b/Eigen/src/Core/DiagonalProduct.h index c03a0c2e1..f5539df13 100644 --- a/Eigen/src/Core/DiagonalProduct.h +++ b/Eigen/src/Core/DiagonalProduct.h @@ -13,6 +13,7 @@ namespace Eigen { +#ifndef EIGEN_TEST_EVALUATORS namespace internal { template<typename MatrixType, typename DiagonalType, int ProductOrder> struct traits<DiagonalProduct<MatrixType, DiagonalType, ProductOrder> > @@ -124,6 +125,17 @@ MatrixBase<Derived>::operator*(const DiagonalBase<DiagonalDerived> &a_diagonal) { return DiagonalProduct<Derived, DiagonalDerived, OnTheRight>(derived(), a_diagonal.derived()); } +#else // EIGEN_TEST_EVALUATORS +/** \returns the diagonal matrix product of \c *this by the diagonal matrix \a diagonal. + */ +template<typename Derived> +template<typename DiagonalDerived> +inline const Product<Derived, DiagonalDerived, LazyProduct> +MatrixBase<Derived>::operator*(const DiagonalBase<DiagonalDerived> &a_diagonal) const +{ + return Product<Derived, DiagonalDerived, LazyProduct>(derived(),a_diagonal.derived()); +} +#endif // EIGEN_TEST_EVALUATORS } // end namespace Eigen diff --git a/Eigen/src/Core/MatrixBase.h b/Eigen/src/Core/MatrixBase.h index 37e7408a4..6453145d0 100644 --- a/Eigen/src/Core/MatrixBase.h +++ b/Eigen/src/Core/MatrixBase.h @@ -215,10 +215,17 @@ template<typename Derived> class MatrixBase template<typename OtherDerived> void applyOnTheRight(const EigenBase<OtherDerived>& other); +#ifndef EIGEN_TEST_EVALUATORS template<typename DiagonalDerived> EIGEN_DEVICE_FUNC const DiagonalProduct<Derived, DiagonalDerived, OnTheRight> operator*(const DiagonalBase<DiagonalDerived> &diagonal) const; +#else // EIGEN_TEST_EVALUATORS + template<typename DiagonalDerived> + EIGEN_DEVICE_FUNC + const Product<Derived, DiagonalDerived, LazyProduct> + operator*(const DiagonalBase<DiagonalDerived> &diagonal) const; +#endif // EIGEN_TEST_EVALUATORS template<typename OtherDerived> EIGEN_DEVICE_FUNC |