From 42bc1f77be65ec5557c00d53ce988598c47a0c5f Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Thu, 24 Mar 2011 09:33:36 +0100 Subject: [PATCH] impl basic product evaluator on top of previous one --- Eigen/src/Core/CoreEvaluators.h | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/Eigen/src/Core/CoreEvaluators.h b/Eigen/src/Core/CoreEvaluators.h index 64ec21a0f..43fc53ccd 100644 --- a/Eigen/src/Core/CoreEvaluators.h +++ b/Eigen/src/Core/CoreEvaluators.h @@ -181,12 +181,12 @@ protected: typename evaluator::type m_rhsImpl; }; -// products +// product -template -struct evaluator_impl > : public evaluator::PlainObject>::type +template +struct evaluator_impl > : public evaluator::PlainObject>::type { - typedef GeneralProduct XprType; + typedef Product XprType; typedef typename XprType::PlainObject PlainObject; typedef typename evaluator::type evaluator_base; @@ -195,16 +195,20 @@ struct evaluator_impl > : public evaluator::type m_lhsImpl(product.lhs()); + // typename product_operand_evaluator::type m_rhsImpl(product.rhs()); + + // TODO do not rely on previous product mechanism !! m_result.resize(product.rows(), product.cols()); - product.evalTo(m_result); + m_result.noalias() = product.lhs() * product.rhs(); } protected: PlainObject m_result; - typename evaluator::type m_lhsImpl; - typename evaluator::type m_rhsImpl; }; } // namespace internal