aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/NoAlias.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2010-02-09 11:05:39 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2010-02-09 11:05:39 +0100
commit5686eca7b1017738a19a32ce0627249e56cfd3eb (patch)
treeeae2f93d90cb58c7625334c3cb754b9c528754fe /Eigen/src/Core/NoAlias.h
parent0398e21198caaf7206851a9081033cddb0797d47 (diff)
* fix multiple temporary copies for coeff based products
* introduce a lazy product version of the coefficient based implementation => flagged is not used anymore => small outer product are now lazy by default (aliasing is really unlikely for outer products)
Diffstat (limited to 'Eigen/src/Core/NoAlias.h')
-rw-r--r--Eigen/src/Core/NoAlias.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/Eigen/src/Core/NoAlias.h b/Eigen/src/Core/NoAlias.h
index 7e2e501b3..9d6cab7f9 100644
--- a/Eigen/src/Core/NoAlias.h
+++ b/Eigen/src/Core/NoAlias.h
@@ -70,13 +70,13 @@ class NoAlias
EIGEN_STRONG_INLINE ExpressionType& operator-=(const ProductBase<ProductDerived, Lhs,Rhs>& other)
{ other.derived().subTo(m_expression); return m_expression; }
- template<typename Lhs, typename Rhs>
- EIGEN_STRONG_INLINE ExpressionType& operator+=(const GeneralProduct<Lhs,Rhs,CoeffBasedProduct>& other)
- { return m_expression.derived() += other.template flagged<0,EvalBeforeAssigningBit|EvalBeforeNestingBit>(); }
+ template<typename Lhs, typename Rhs, int NestingFlags>
+ EIGEN_STRONG_INLINE ExpressionType& operator+=(const CoeffBasedProduct<Lhs,Rhs,NestingFlags>& other)
+ { return m_expression.derived() += CoeffBasedProduct<Lhs,Rhs,0>(other.lhs(), other.rhs()); }
- template<typename Lhs, typename Rhs>
- EIGEN_STRONG_INLINE ExpressionType& operator-=(const GeneralProduct<Lhs,Rhs,CoeffBasedProduct>& other)
- { return m_expression.derived() -= other.template flagged<0,EvalBeforeAssigningBit|EvalBeforeNestingBit>(); }
+ template<typename Lhs, typename Rhs, int NestingFlags>
+ EIGEN_STRONG_INLINE ExpressionType& operator-=(const CoeffBasedProduct<Lhs,Rhs,NestingFlags>& other)
+ { return m_expression.derived() -= CoeffBasedProduct<Lhs,Rhs,0>(other.lhs(), other.rhs()); }
#endif
protected: