Introduce generic Flagged xpr, remove already Lazy.h and Temporary.h

Rename DefaultLostFlagMask --> HerediraryBits
This commit is contained in:
Benoit Jacob
2008-05-14 08:20:15 +00:00
parent fd2e9e5c3c
commit 5da60897ab
21 changed files with 80 additions and 156 deletions

View File

@@ -44,13 +44,16 @@ const unsigned int UnitDiagBit = 0x80; ///< means all diagonal coefficients
const unsigned int NullLowerBit = 0x200; ///< means the strictly triangular lower part is 0
const unsigned int NullUpperBit = 0x400; ///< means the strictly triangular upper part is 0
const unsigned int DirectAccessBit = 0x800; ///< means the underlying matrix data can be direclty accessed
const unsigned int TemporaryBit = 0x1000; ///< means the expression should be copied by value when nested
enum { Upper=NullLowerBit, Lower=NullUpperBit };
enum { Aligned=0, UnAligned=1 };
// list of flags that are lost by default
const unsigned int DefaultLostFlagMask = ~(VectorizableBit | Like1DArrayBit | DirectAccessBit
| NullDiagBit | UnitDiagBit | NullLowerBit | NullUpperBit);
// list of flags that are inherited by default
const unsigned int HereditaryBits = RowMajorBit
| EvalBeforeNestingBit
| EvalBeforeAssigningBit
| LargeBit;
enum { ConditionalJumpCost = 5 };
enum CornerType { TopLeft, TopRight, BottomLeft, BottomRight };

View File

@@ -34,8 +34,7 @@ template<typename _Scalar, int _Rows, int _Cols,
int _MaxRows = _Rows, int _MaxCols = _Cols>
class Matrix;
template<typename ExpressionType> class Lazy;
template<typename ExpressionType> class Temporary;
template<typename ExpressionType, unsigned int Added, unsigned int Removed> class Flagged;
template<typename MatrixType> class Minor;
template<typename MatrixType, int BlockRows=Dynamic, int BlockCols=Dynamic> class Block;
template<typename MatrixType> class Transpose;

View File

@@ -135,6 +135,7 @@ typedef typename Eigen::NumTraits<Scalar>::Real RealScalar; \
typedef typename Base::PacketScalar PacketScalar; \
typedef typename Eigen::ei_nested<Derived>::type Nested; \
typedef typename Eigen::ei_eval<Derived>::type Eval; \
typedef Eigen::Flagged<Derived, TemporaryBit, 0> Temporary; \
enum { RowsAtCompileTime = Base::RowsAtCompileTime, \
ColsAtCompileTime = Base::ColsAtCompileTime, \
MaxRowsAtCompileTime = Base::MaxRowsAtCompileTime, \

View File

@@ -194,12 +194,7 @@ template<typename T> struct ei_unconst<const T> { typedef T type; };
template<typename T> struct ei_is_temporary
{
enum { ret = 0 };
};
template<typename T> struct ei_is_temporary<Temporary<T> >
{
enum { ret = 1 };
enum { ret = ei_traits<T>::Flags & TemporaryBit };
};
template<typename T, int n=1> struct ei_nested