rename back MayAliasBit to EvalBeforeAssigningBit

This commit is contained in:
Gael Guennebaud 2009-08-16 00:14:05 +02:00
parent f5f2b222a3
commit 65fe5f76fd
9 changed files with 21 additions and 23 deletions

View File

@ -434,7 +434,7 @@ EIGEN_STRONG_INLINE Derived& MatrixBase<Derived>
}
template<typename Derived, typename OtherDerived,
bool EvalBeforeAssigning = (int(OtherDerived::Flags) & MayAliasBit) != 0,
bool EvalBeforeAssigning = (int(OtherDerived::Flags) & EvalBeforeAssigningBit) != 0,
bool NeedToTranspose = Derived::IsVectorAtCompileTime
&& OtherDerived::IsVectorAtCompileTime
&& ((int(Derived::RowsAtCompileTime) == 1 && int(OtherDerived::ColsAtCompileTime) == 1)

View File

@ -132,7 +132,7 @@ MatrixBase<Derived>::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<Derived>::marked() const
* \sa class Flagged, marked()
*/
template<typename Derived>
inline const Flagged<Derived, 0, MayAliasBit>
inline const Flagged<Derived, 0, EvalBeforeAssigningBit>
MatrixBase<Derived>::lazy() const
{
return derived();

View File

@ -179,11 +179,11 @@ template<typename Derived> class MapBase
// explicitly add these two overloads.
// Maybe there exists a better solution though.
template<typename ProductDerived, typename Lhs,typename Rhs>
Derived& operator+=(const Flagged<ProductBase<ProductDerived,Lhs,Rhs>, 0, MayAliasBit>& other)
Derived& operator+=(const Flagged<ProductBase<ProductDerived,Lhs,Rhs>, 0, EvalBeforeAssigningBit>& other)
{ return Base::operator+=(other); }
template<typename ProductDerived, typename Lhs,typename Rhs>
Derived& operator-=(const Flagged<ProductBase<ProductDerived,Lhs,Rhs>, 0, MayAliasBit>& other)
Derived& operator-=(const Flagged<ProductBase<ProductDerived,Lhs,Rhs>, 0, EvalBeforeAssigningBit>& other)
{ return Base::operator-=(other); }
template<typename OtherDerived>

View File

@ -577,7 +577,7 @@ class Matrix
template<typename OtherDerived>
EIGEN_STRONG_INLINE Matrix& _set(const MatrixBase<OtherDerived>& other)
{
_set_selector(other.derived(), typename ei_meta_if<static_cast<bool>(int(OtherDerived::Flags) & MayAliasBit), ei_meta_true, ei_meta_false>::ret());
_set_selector(other.derived(), typename ei_meta_if<static_cast<bool>(int(OtherDerived::Flags) & EvalBeforeAssigningBit), ei_meta_true, ei_meta_false>::ret());
return *this;
}

View File

@ -329,7 +329,7 @@ template<typename Derived> class MatrixBase
/** \deprecated because .lazy() is deprecated
* Overloaded for cache friendly product evaluation */
template<typename OtherDerived>
Derived& lazyAssign(const Flagged<OtherDerived, 0, MayAliasBit>& other)
Derived& lazyAssign(const Flagged<OtherDerived, 0, EvalBeforeAssigningBit>& other)
{ return lazyAssign(other._expression()); }
template<typename ProductDerived, typename Lhs, typename Rhs>
@ -337,11 +337,11 @@ template<typename Derived> class MatrixBase
template<typename ProductDerived, typename Lhs, typename Rhs>
Derived& operator+=(const Flagged<ProductBase<ProductDerived, Lhs,Rhs>, 0,
MayAliasBit>& other);
EvalBeforeAssigningBit>& other);
template<typename ProductDerived, typename Lhs, typename Rhs>
Derived& operator-=(const Flagged<ProductBase<ProductDerived, Lhs,Rhs>, 0,
MayAliasBit>& other);
EvalBeforeAssigningBit>& other);
#endif // not EIGEN_PARSED_BY_DOXYGEN
CommaInitializer<Derived> operator<< (const Scalar& s);
@ -630,7 +630,7 @@ template<typename Derived> class MatrixBase
template<unsigned int Added>
const Flagged<Derived, Added, 0> marked() const;
const Flagged<Derived, 0, MayAliasBit> lazy() const;
const Flagged<Derived, 0, EvalBeforeAssigningBit> lazy() const;
NoAlias<Derived> noalias();

View File

@ -39,7 +39,7 @@ struct ei_traits<ProductBase<Derived,_Lhs,_Rhs> >
ColsAtCompileTime = ei_traits<Rhs>::ColsAtCompileTime,
MaxRowsAtCompileTime = ei_traits<Lhs>::MaxRowsAtCompileTime,
MaxColsAtCompileTime = ei_traits<Rhs>::MaxColsAtCompileTime,
Flags = EvalBeforeNestingBit | MayAliasBit,
Flags = EvalBeforeNestingBit | EvalBeforeAssigningBit,
CoeffReadCost = 0 // FIXME why is it needed ?
};
};
@ -119,7 +119,7 @@ class ProductBase : public MatrixBase<Derived>
return res;
}
const Flagged<ProductBase, 0, MayAliasBit> lazy() const
const Flagged<ProductBase, 0, EvalBeforeAssigningBit> lazy() const
{
return *this;
}
@ -228,7 +228,7 @@ Derived& MatrixBase<Derived>::lazyAssign(const ProductBase<ProductDerived, Lhs,R
template<typename Derived>
template<typename ProductDerived, typename Lhs, typename Rhs>
Derived& MatrixBase<Derived>::operator+=(const Flagged<ProductBase<ProductDerived, Lhs,Rhs>, 0,
MayAliasBit>& other)
EvalBeforeAssigningBit>& other)
{
other._expression().derived().addTo(derived()); return derived();
}
@ -238,7 +238,7 @@ Derived& MatrixBase<Derived>::operator+=(const Flagged<ProductBase<ProductDerive
template<typename Derived>
template<typename ProductDerived, typename Lhs, typename Rhs>
Derived& MatrixBase<Derived>::operator-=(const Flagged<ProductBase<ProductDerived, Lhs,Rhs>, 0,
MayAliasBit>& other)
EvalBeforeAssigningBit>& other)
{
other._expression().derived().subTo(derived()); return derived();
}

View File

@ -477,7 +477,7 @@ template<typename OtherDerived>
inline TriangularView<MatrixType, Mode>&
TriangularView<MatrixType, Mode>::operator=(const MatrixBase<OtherDerived>& other)
{
if(OtherDerived::Flags & MayAliasBit)
if(OtherDerived::Flags & EvalBeforeAssigningBit)
{
typename OtherDerived::PlainMatrixType other_evaluated(other.rows(), other.cols());
other_evaluated.template triangularView<Mode>().lazyAssign(other.derived());
@ -512,7 +512,7 @@ inline TriangularView<MatrixType, Mode>&
TriangularView<MatrixType, Mode>::operator=(const TriangularBase<OtherDerived>& other)
{
ei_assert(Mode == OtherDerived::Mode);
if(ei_traits<OtherDerived>::Flags & MayAliasBit)
if(ei_traits<OtherDerived>::Flags & EvalBeforeAssigningBit)
{
typename OtherDerived::PlainMatrixType other_evaluated(other.rows(), other.cols());
other_evaluated.template triangularView<Mode>().lazyAssign(other.derived());
@ -548,7 +548,7 @@ template<typename Derived>
template<typename DenseDerived>
void TriangularBase<Derived>::evalToDense(MatrixBase<DenseDerived> &other) const
{
if(ei_traits<Derived>::Flags & MayAliasBit)
if(ei_traits<Derived>::Flags & EvalBeforeAssigningBit)
{
typename Derived::PlainMatrixType other_evaluated(rows(), cols());
evalToDenseLazy(other_evaluated);

View File

@ -76,7 +76,7 @@ struct ei_traits<GeneralProduct<LhsNested,RhsNested,UnrolledProduct> >
RemovedBits = ~(EvalToRowMajor ? 0 : RowMajorBit),
Flags = ((unsigned int)(LhsFlags | RhsFlags) & HereditaryBits & RemovedBits)
| MayAliasBit
| EvalBeforeAssigningBit
| EvalBeforeNestingBit
| (CanVectorizeLhs || CanVectorizeRhs ? PacketAccessBit : 0)
| (LhsFlags & RhsFlags & AlignedBit),

View File

@ -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()