aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/ProductEvaluators.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2013-12-02 16:19:14 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2013-12-02 16:19:14 +0100
commit7f917807c6a72ae219880fb72e2d644d617427bc (patch)
tree735523abde6371ed1ca9aba02da0b7bd2de51c3c /Eigen/src/Core/ProductEvaluators.h
parent8af1ba534669a223ca69136046690eb6d49ff619 (diff)
Fix product evaluator when TEST_EVALUATOR in not ON
Diffstat (limited to 'Eigen/src/Core/ProductEvaluators.h')
-rw-r--r--Eigen/src/Core/ProductEvaluators.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/Eigen/src/Core/ProductEvaluators.h b/Eigen/src/Core/ProductEvaluators.h
index 51228be5f..26145ceff 100644
--- a/Eigen/src/Core/ProductEvaluators.h
+++ b/Eigen/src/Core/ProductEvaluators.h
@@ -58,7 +58,9 @@ struct product_evaluator<Product<Lhs, Rhs, DefaultProduct>, ProductTag, DenseSha
product_evaluator(const XprType& xpr)
: m_result(xpr.rows(), xpr.cols())
{
+
::new (static_cast<Base*>(this)) Base(m_result);
+
dense_product_impl<Lhs, Rhs>::evalTo(m_result, xpr.lhs(), xpr.rhs());
}
@@ -186,7 +188,11 @@ struct dense_product_impl<Lhs,Rhs,CoeffBasedProductMode>
template<typename Dst>
static inline void evalTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)
- { dst = lazyprod(lhs,rhs); }
+ {
+ // TODO: use the following instead of calling call_assignment
+ // dst = lazyprod(lhs,rhs);
+ call_assignment(dst, lazyprod(lhs,rhs), internal::assign_op<Scalar>());
+ }
template<typename Dst>
static inline void addTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)