mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-03-07 18:27:40 +08:00
Indexed view should have RowMajorBit when there is staticly a single row
This commit is contained in:
parent
a187ffea28
commit
fa8fd4b4d5
@ -171,7 +171,9 @@ struct unary_evaluator<IndexedView<ArgType, RowIndices, ColIndices>, IndexBased>
|
||||
|
||||
FlagsLinearAccessBit = (traits<XprType>::RowsAtCompileTime == 1 || traits<XprType>::ColsAtCompileTime == 1) ? LinearAccessBit : 0,
|
||||
|
||||
Flags = (evaluator<ArgType>::Flags & (HereditaryBits /*| LinearAccessBit | DirectAccessBit*/)) | FlagsLinearAccessBit,
|
||||
FlagsRowMajorBit = traits<XprType>::FlagsRowMajorBit,
|
||||
|
||||
Flags = (evaluator<ArgType>::Flags & (HereditaryBits & ~RowMajorBit /*| LinearAccessBit | DirectAccessBit*/)) | FlagsLinearAccessBit | FlagsRowMajorBit,
|
||||
|
||||
Alignment = 0
|
||||
};
|
||||
|
@ -439,6 +439,12 @@ void check_indexed_view()
|
||||
VERIFY( MATCH( A(all,1)(1), "101"));
|
||||
}
|
||||
|
||||
//Bug IndexView with a single static row should be RowMajor:
|
||||
{
|
||||
// A(1, seq(0,2,1)).cwiseAbs().colwise().replicate(2).eval();
|
||||
STATIC_CHECK(( (internal::evaluator<decltype( A(1,seq(0,2,1)) )>::Flags & RowMajorBit) == RowMajorBit ));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
EIGEN_DECLARE_TEST(indexed_view)
|
||||
|
Loading…
Reference in New Issue
Block a user