mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
* 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)
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user