diff --git a/Eigen/src/Core/Assign.h b/Eigen/src/Core/Assign.h index b0e69224e..4bd1046a7 100644 --- a/Eigen/src/Core/Assign.h +++ b/Eigen/src/Core/Assign.h @@ -434,7 +434,7 @@ EIGEN_STRONG_INLINE Derived& MatrixBase } template::marked() const /** \deprecated use MatrixBase::noalias() * - * \returns an expression of *this with the MayAliasBit flag removed. + * \returns an expression of *this with the EvalBeforeAssigningBit flag removed. * * Example: \include MatrixBase_lazy.cpp * Output: \verbinclude MatrixBase_lazy.out @@ -140,7 +140,7 @@ MatrixBase::marked() const * \sa class Flagged, marked() */ template -inline const Flagged +inline const Flagged MatrixBase::lazy() const { return derived(); diff --git a/Eigen/src/Core/MapBase.h b/Eigen/src/Core/MapBase.h index b9e9374be..9cb085b61 100644 --- a/Eigen/src/Core/MapBase.h +++ b/Eigen/src/Core/MapBase.h @@ -179,11 +179,11 @@ template class MapBase // explicitly add these two overloads. // Maybe there exists a better solution though. template - Derived& operator+=(const Flagged, 0, MayAliasBit>& other) + Derived& operator+=(const Flagged, 0, EvalBeforeAssigningBit>& other) { return Base::operator+=(other); } template - Derived& operator-=(const Flagged, 0, MayAliasBit>& other) + Derived& operator-=(const Flagged, 0, EvalBeforeAssigningBit>& other) { return Base::operator-=(other); } template diff --git a/Eigen/src/Core/Matrix.h b/Eigen/src/Core/Matrix.h index d129535b6..f58424ba2 100644 --- a/Eigen/src/Core/Matrix.h +++ b/Eigen/src/Core/Matrix.h @@ -577,7 +577,7 @@ class Matrix template EIGEN_STRONG_INLINE Matrix& _set(const MatrixBase& other) { - _set_selector(other.derived(), typename ei_meta_if(int(OtherDerived::Flags) & MayAliasBit), ei_meta_true, ei_meta_false>::ret()); + _set_selector(other.derived(), typename ei_meta_if(int(OtherDerived::Flags) & EvalBeforeAssigningBit), ei_meta_true, ei_meta_false>::ret()); return *this; } diff --git a/Eigen/src/Core/MatrixBase.h b/Eigen/src/Core/MatrixBase.h index 6ed96e286..380ac89c0 100644 --- a/Eigen/src/Core/MatrixBase.h +++ b/Eigen/src/Core/MatrixBase.h @@ -329,7 +329,7 @@ template class MatrixBase /** \deprecated because .lazy() is deprecated * Overloaded for cache friendly product evaluation */ template - Derived& lazyAssign(const Flagged& other) + Derived& lazyAssign(const Flagged& other) { return lazyAssign(other._expression()); } template @@ -337,11 +337,11 @@ template class MatrixBase template Derived& operator+=(const Flagged, 0, - MayAliasBit>& other); + EvalBeforeAssigningBit>& other); template Derived& operator-=(const Flagged, 0, - MayAliasBit>& other); + EvalBeforeAssigningBit>& other); #endif // not EIGEN_PARSED_BY_DOXYGEN CommaInitializer operator<< (const Scalar& s); @@ -630,7 +630,7 @@ template class MatrixBase template const Flagged marked() const; - const Flagged lazy() const; + const Flagged lazy() const; NoAlias noalias(); diff --git a/Eigen/src/Core/ProductBase.h b/Eigen/src/Core/ProductBase.h index 867aa7a15..5e259b7f7 100644 --- a/Eigen/src/Core/ProductBase.h +++ b/Eigen/src/Core/ProductBase.h @@ -39,7 +39,7 @@ struct ei_traits > ColsAtCompileTime = ei_traits::ColsAtCompileTime, MaxRowsAtCompileTime = ei_traits::MaxRowsAtCompileTime, MaxColsAtCompileTime = ei_traits::MaxColsAtCompileTime, - Flags = EvalBeforeNestingBit | MayAliasBit, + Flags = EvalBeforeNestingBit | EvalBeforeAssigningBit, CoeffReadCost = 0 // FIXME why is it needed ? }; }; @@ -119,7 +119,7 @@ class ProductBase : public MatrixBase return res; } - const Flagged lazy() const + const Flagged lazy() const { return *this; } @@ -228,7 +228,7 @@ Derived& MatrixBase::lazyAssign(const ProductBase template Derived& MatrixBase::operator+=(const Flagged, 0, - MayAliasBit>& other) + EvalBeforeAssigningBit>& other) { other._expression().derived().addTo(derived()); return derived(); } @@ -238,7 +238,7 @@ Derived& MatrixBase::operator+=(const Flagged template Derived& MatrixBase::operator-=(const Flagged, 0, - MayAliasBit>& other) + EvalBeforeAssigningBit>& other) { other._expression().derived().subTo(derived()); return derived(); } diff --git a/Eigen/src/Core/TriangularMatrix.h b/Eigen/src/Core/TriangularMatrix.h index cfaf89733..b0362f20c 100644 --- a/Eigen/src/Core/TriangularMatrix.h +++ b/Eigen/src/Core/TriangularMatrix.h @@ -477,7 +477,7 @@ template inline TriangularView& TriangularView::operator=(const MatrixBase& other) { - if(OtherDerived::Flags & MayAliasBit) + if(OtherDerived::Flags & EvalBeforeAssigningBit) { typename OtherDerived::PlainMatrixType other_evaluated(other.rows(), other.cols()); other_evaluated.template triangularView().lazyAssign(other.derived()); @@ -512,7 +512,7 @@ inline TriangularView& TriangularView::operator=(const TriangularBase& other) { ei_assert(Mode == OtherDerived::Mode); - if(ei_traits::Flags & MayAliasBit) + if(ei_traits::Flags & EvalBeforeAssigningBit) { typename OtherDerived::PlainMatrixType other_evaluated(other.rows(), other.cols()); other_evaluated.template triangularView().lazyAssign(other.derived()); @@ -548,7 +548,7 @@ template template void TriangularBase::evalToDense(MatrixBase &other) const { - if(ei_traits::Flags & MayAliasBit) + if(ei_traits::Flags & EvalBeforeAssigningBit) { typename Derived::PlainMatrixType other_evaluated(rows(), cols()); evalToDenseLazy(other_evaluated); diff --git a/Eigen/src/Core/products/GeneralUnrolled.h b/Eigen/src/Core/products/GeneralUnrolled.h index 2961d9452..7241976a8 100644 --- a/Eigen/src/Core/products/GeneralUnrolled.h +++ b/Eigen/src/Core/products/GeneralUnrolled.h @@ -76,7 +76,7 @@ struct ei_traits > RemovedBits = ~(EvalToRowMajor ? 0 : RowMajorBit), Flags = ((unsigned int)(LhsFlags | RhsFlags) & HereditaryBits & RemovedBits) - | MayAliasBit + | EvalBeforeAssigningBit | EvalBeforeNestingBit | (CanVectorizeLhs || CanVectorizeRhs ? PacketAccessBit : 0) | (LhsFlags & RhsFlags & AlignedBit), diff --git a/Eigen/src/Core/util/Constants.h b/Eigen/src/Core/util/Constants.h index 1d55217f5..21e7f62c3 100644 --- a/Eigen/src/Core/util/Constants.h +++ b/Eigen/src/Core/util/Constants.h @@ -76,10 +76,8 @@ const unsigned int EvalBeforeNestingBit = 0x2; /** \ingroup flags * - * Means the expression cannot be evaluated safely if the result alias one - * of the operands of the expression. Therefore it should be evaluated - * before any assignement. */ -const unsigned int MayAliasBit = 0x4; + * means the expression should be evaluated before any assignement */ +const unsigned int EvalBeforeAssigningBit = 0x4; /** \ingroup flags * @@ -184,7 +182,7 @@ const unsigned int SparseBit = 0x1000; // list of flags that are inherited by default const unsigned int HereditaryBits = RowMajorBit | EvalBeforeNestingBit - | MayAliasBit + | EvalBeforeAssigningBit | SparseBit; // Possible values for the Mode parameter of part()