From c927af60edbf7dd859fc8057151e40b0fe2de661 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Wed, 30 Nov 2016 17:59:13 +0100 Subject: Fix a performance regression in (mat*mat)*vec for which mat*mat was evaluated multiple times. --- Eigen/src/Core/GeneralProduct.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Eigen/src/Core/GeneralProduct.h') diff --git a/Eigen/src/Core/GeneralProduct.h b/Eigen/src/Core/GeneralProduct.h index 0cc2d08e2..8d87cab1f 100644 --- a/Eigen/src/Core/GeneralProduct.h +++ b/Eigen/src/Core/GeneralProduct.h @@ -329,6 +329,7 @@ template<> struct gemv_dense_selector template static void run(const Lhs &lhs, const Rhs &rhs, Dest& dest, const typename Dest::Scalar& alpha) { + EIGEN_STATIC_ASSERT((!nested_eval::Evaluate),EIGEN_INTERNAL_COMPILATION_ERROR_OR_YOU_MADE_A_PROGRAMMING_MISTAKE); // TODO if rhs is large enough it might be beneficial to make sure that dest is sequentially stored in memory, otherwise use a temp typename nested_eval::type actual_rhs(rhs); const Index size = rhs.rows(); @@ -342,6 +343,7 @@ template<> struct gemv_dense_selector template static void run(const Lhs &lhs, const Rhs &rhs, Dest& dest, const typename Dest::Scalar& alpha) { + EIGEN_STATIC_ASSERT((!nested_eval::Evaluate),EIGEN_INTERNAL_COMPILATION_ERROR_OR_YOU_MADE_A_PROGRAMMING_MISTAKE); typename nested_eval::type actual_rhs(rhs); const Index rows = dest.rows(); for(Index i=0; i