Introduced NestParentByRefBit and NestByRefBit - this should fix temporaries related to nested products.

Fixed a few typos and a few warnings.
This commit is contained in:
Hauke Heibel
2010-02-06 17:43:32 +01:00
parent 6f3f857897
commit 871698d3aa
29 changed files with 84 additions and 75 deletions

View File

@@ -55,7 +55,7 @@ struct ei_traits<Replicate<MatrixType,RowFactor,ColFactor> >
: ColFactor * MatrixType::ColsAtCompileTime,
MaxRowsAtCompileTime = RowsAtCompileTime,
MaxColsAtCompileTime = ColsAtCompileTime,
Flags = _MatrixTypeNested::Flags & HereditaryBits,
Flags = (_MatrixTypeNested::Flags & HereditaryBits) | EIGEN_PROPAGATE_NESTING_BIT(MatrixType::Flags),
CoeffReadCost = _MatrixTypeNested::CoeffReadCost
};
};

View File

@@ -59,7 +59,9 @@ struct ei_traits<Reverse<MatrixType, Direction> >
LinearAccess = ( (Direction==BothDirections) && (int(_MatrixTypeNested::Flags)&PacketAccessBit) )
? LinearAccessBit : 0,
Flags = (int(_MatrixTypeNested::Flags) & (HereditaryBits | PacketAccessBit | LinearAccess)),
Flags = (int(_MatrixTypeNested::Flags)
& (HereditaryBits | PacketAccessBit | LinearAccess))
| EIGEN_PROPAGATE_NESTING_BIT(MatrixType::Flags),
CoeffReadCost = _MatrixTypeNested::CoeffReadCost
};

View File

@@ -55,7 +55,8 @@ struct ei_traits<Select<ConditionMatrixType, ThenMatrixType, ElseMatrixType> >
ColsAtCompileTime = ConditionMatrixType::ColsAtCompileTime,
MaxRowsAtCompileTime = ConditionMatrixType::MaxRowsAtCompileTime,
MaxColsAtCompileTime = ConditionMatrixType::MaxColsAtCompileTime,
Flags = (unsigned int)ThenMatrixType::Flags & ElseMatrixType::Flags & HereditaryBits,
Flags = ((unsigned int)ThenMatrixType::Flags & ElseMatrixType::Flags & HereditaryBits)
| EIGEN_PROPAGATE_NESTING_BIT(ConditionMatrixType::Flags|ThenMatrixType::Flags|ElseMatrixType::Flags),
CoeffReadCost = ei_traits<typename ei_cleantype<ConditionMatrixNested>::type>::CoeffReadCost
+ EIGEN_ENUM_MAX(ei_traits<typename ei_cleantype<ThenMatrixNested>::type>::CoeffReadCost,
ei_traits<typename ei_cleantype<ElseMatrixNested>::type>::CoeffReadCost)

View File

@@ -60,7 +60,8 @@ struct ei_traits<PartialReduxExpr<MatrixType, MemberOp, Direction> >
ColsAtCompileTime = Direction==Horizontal ? 1 : MatrixType::ColsAtCompileTime,
MaxRowsAtCompileTime = Direction==Vertical ? 1 : MatrixType::MaxRowsAtCompileTime,
MaxColsAtCompileTime = Direction==Horizontal ? 1 : MatrixType::MaxColsAtCompileTime,
Flags = (unsigned int)_MatrixTypeNested::Flags & HereditaryBits,
Flags = ((unsigned int)_MatrixTypeNested::Flags & HereditaryBits)
| EIGEN_PROPAGATE_NESTING_BIT(_MatrixTypeNested::Flags),
TraversalSize = Direction==Vertical ? RowsAtCompileTime : ColsAtCompileTime
};
#if EIGEN_GNUC_AT_LEAST(3,4)