diff options
-rw-r--r-- | Eigen/src/Core/Reverse.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Eigen/src/Core/Reverse.h b/Eigen/src/Core/Reverse.h index 5a96aeeb3..5858e684c 100644 --- a/Eigen/src/Core/Reverse.h +++ b/Eigen/src/Core/Reverse.h @@ -59,7 +59,7 @@ 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 | DirectAccessBit), CoeffReadCost = _MatrixTypeNested::CoeffReadCost }; @@ -109,6 +109,11 @@ template<typename MatrixType, int Direction> class Reverse inline Index rows() const { return m_matrix.rows(); } inline Index cols() const { return m_matrix.cols(); } + inline Index innerStride() const + { + return -m_matrix.innerStride(); + } + inline Scalar& operator()(Index row, Index col) { ei_assert(row >= 0 && row < rows() && col >= 0 && col < cols()); |