From 4140ee039d1b9adc7ec0e747e466ee073d239d29 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Thu, 8 Oct 2015 21:41:27 +0200 Subject: [PATCH] Fix propagation of AssumeAliasing for expression as: "scalar * (A*B)" --- Eigen/src/Core/ProductEvaluators.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Eigen/src/Core/ProductEvaluators.h b/Eigen/src/Core/ProductEvaluators.h index 7dea15a30..a40113325 100755 --- a/Eigen/src/Core/ProductEvaluators.h +++ b/Eigen/src/Core/ProductEvaluators.h @@ -38,6 +38,12 @@ struct evaluator > // Catch scalar * ( A * B ) and transform it to (A*scalar) * B // TODO we should apply that rule only if that's really helpful template +struct evaluator_traits, const Product > > + : evaluator_traits_base, const Product > > +{ + enum { AssumeAliasing = 1 }; +}; +template struct evaluator, const Product > > : public evaluator,const Lhs>, Rhs, DefaultProduct> > {