aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Eigen/src/Core/DiagonalProduct.h12
-rw-r--r--Eigen/src/Core/MatrixBase.h7
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