aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/IndexedView.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2017-01-06 13:10:10 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2017-01-06 13:10:10 +0100
commit3730e3ca9ec8e256b76c08fb4b1e928c62f37b40 (patch)
tree6470f9f5666d933de11090b4d68427f24354744d /Eigen/src/Core/IndexedView.h
parent60e99ad8d76c167a48dab82d2fc16a87956fd7a4 (diff)
Use "fix" for compile-time values, propagate compile-time sizes for span, clean some cleanup.
Diffstat (limited to 'Eigen/src/Core/IndexedView.h')
-rw-r--r--Eigen/src/Core/IndexedView.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/Eigen/src/Core/IndexedView.h b/Eigen/src/Core/IndexedView.h
index e11739a99..7fc856feb 100644
--- a/Eigen/src/Core/IndexedView.h
+++ b/Eigen/src/Core/IndexedView.h
@@ -19,8 +19,19 @@ struct traits<IndexedView<XprType, RowIndices, ColIndices> >
: traits<XprType>
{
enum {
+ RowsAtCompileTime = get_compile_time_size<RowIndices>::value,
+ ColsAtCompileTime = get_compile_time_size<ColIndices>::value,
+ MaxRowsAtCompileTime = RowsAtCompileTime != Dynamic ? int(RowsAtCompileTime) : int(traits<XprType>::MaxRowsAtCompileTime),
+ MaxColsAtCompileTime = ColsAtCompileTime != Dynamic ? int(ColsAtCompileTime) : int(traits<XprType>::MaxColsAtCompileTime),
+
+ XprTypeIsRowMajor = (int(traits<XprType>::Flags)&RowMajorBit) != 0,
+ IsRowMajor = (MaxRowsAtCompileTime==1&&MaxColsAtCompileTime!=1) ? 1
+ : (MaxColsAtCompileTime==1&&MaxRowsAtCompileTime!=1) ? 0
+ : XprTypeIsRowMajor,
+
+ FlagsRowMajorBit = IsRowMajor ? RowMajorBit : 0,
FlagsLvalueBit = is_lvalue<XprType>::value ? LvalueBit : 0,
- Flags = traits<XprType>::Flags & (RowMajorBit | FlagsLvalueBit /*| DirectAccessBit*/),
+ Flags = (traits<XprType>::Flags & HereditaryBits) | FlagsLvalueBit | FlagsRowMajorBit,
//MatrixTypeInnerStride = inner_stride_at_compile_time<XprType>::ret,
InnerStrideAtCompileTime = int(Dynamic),
OuterStrideAtCompileTime = int(Dynamic)