diff options
author | Gael Guennebaud <g.gael@free.fr> | 2008-05-01 18:58:30 +0000 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2008-05-01 18:58:30 +0000 |
commit | ef5b20bc50fb0a44ca48e6167d98437f4f2ee75e (patch) | |
tree | c9bec2736df55f9cb4027fc62ac48982146dba8a /Eigen/src/Core/CwiseUnaryOp.h | |
parent | 5588def0cf53e0b65740bf51658123a3c6401287 (diff) |
fix flag and cost computations for nested expressions
Diffstat (limited to 'Eigen/src/Core/CwiseUnaryOp.h')
-rw-r--r-- | Eigen/src/Core/CwiseUnaryOp.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Eigen/src/Core/CwiseUnaryOp.h b/Eigen/src/Core/CwiseUnaryOp.h index 5106254d2..76c6ed818 100644 --- a/Eigen/src/Core/CwiseUnaryOp.h +++ b/Eigen/src/Core/CwiseUnaryOp.h @@ -45,15 +45,19 @@ struct ei_traits<CwiseUnaryOp<UnaryOp, MatrixType> > typedef typename ei_result_of< UnaryOp(typename MatrixType::Scalar) >::type Scalar; + typedef typename MatrixType::Nested MatrixTypeNested; + typedef typename ei_unref<MatrixTypeNested>::type _MatrixTypeNested; enum { + MatrixTypeCoeffReadCost = _MatrixTypeNested::CoeffReadCost, + MatrixTypeFlags = _MatrixTypeNested::Flags, RowsAtCompileTime = MatrixType::RowsAtCompileTime, ColsAtCompileTime = MatrixType::ColsAtCompileTime, MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime, MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime, - Flags = (MatrixType::Flags & ( + Flags = (MatrixTypeFlags & ( DefaultLostFlagMask | Like1DArrayBit | (ei_functor_traits<UnaryOp>::IsVectorizable ? VectorizableBit : 0))), - CoeffReadCost = MatrixType::CoeffReadCost + ei_functor_traits<UnaryOp>::Cost + CoeffReadCost = MatrixTypeCoeffReadCost + ei_functor_traits<UnaryOp>::Cost }; }; |