12 #ifndef EIGEN_REVERSE_H 13 #define EIGEN_REVERSE_H 19 template<
typename MatrixType,
int Direction>
29 RowsAtCompileTime = MatrixType::RowsAtCompileTime,
30 ColsAtCompileTime = MatrixType::ColsAtCompileTime,
31 MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,
32 MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime,
63 template<
typename MatrixType,
int Direction>
class Reverse 71 using Base::IsRowMajor;
76 IsColMajor = !IsRowMajor,
79 OffsetRow = ReverseRow && IsColMajor ? PacketSize : 1,
80 OffsetCol = ReverseCol && IsRowMajor ? PacketSize : 1,
82 || ((Direction ==
Vertical) && IsColMajor)
92 EIGEN_DEVICE_FUNC inline
Index rows()
const {
return m_matrix.rows(); }
93 EIGEN_DEVICE_FUNC
inline Index cols()
const {
return m_matrix.cols(); }
97 return -m_matrix.innerStride();
116 template<
typename Derived>
138 template<
typename Derived>
165 template<
int Direction>
171 template<
typename ExpressionType>
172 static void run(ExpressionType &xpr)
175 xpr.topRows(half).swap(xpr.bottomRows(half).colwise().reverse());
182 template<
typename ExpressionType>
183 static void run(ExpressionType &xpr)
186 xpr.leftCols(half).swap(xpr.rightCols(half).rowwise().reverse());
203 template<
typename ExpressionType,
int Direction>
211 #endif // EIGEN_REVERSE_H
EIGEN_DEVICE_FUNC ColsBlockXpr rightCols(Index n)
This is the const version of rightCols(Index).
EIGEN_DEVICE_FUNC void reverseInPlace()
internal::reverse_packet_cond< PacketScalar, ReversePacket > reverse_packet
EIGEN_DEVICE_FUNC SegmentReturnType tail(Index n)
This is the const version of tail(Index).
const unsigned int LvalueBit
internal::dense_xpr_base< Reverse >::type Base
Namespace containing all symbols from the Eigen library.
EIGEN_DEVICE_FUNC Index cols() const
EIGEN_DEVICE_FUNC const internal::remove_all< typename MatrixType::Nested >::type & nestedExpression() const
EIGEN_DEVICE_FUNC RowsBlockXpr topRows(Index n)
This is the const version of topRows(Index).
const unsigned int RowMajorBit
EIGEN_DEVICE_FUNC Reverse(const MatrixType &matrix)
static PacketType run(const PacketType &x)
traits< MatrixType >::StorageKind StorageKind
static void run(ExpressionType &xpr)
EIGEN_DEVICE_FUNC ColsBlockXpr leftCols(Index n)
This is the const version of leftCols(Index).
traits< MatrixType >::XprKind XprKind
static PacketType run(const PacketType &x)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
static void run(ExpressionType &xpr)
#define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived)
remove_reference< MatrixTypeNested >::type _MatrixTypeNested
EIGEN_DEVICE_FUNC RowsBlockXpr bottomRows(Index n)
This is the const version of bottomRows(Index).
EIGEN_DEVICE_FUNC ReverseReturnType reverse()
void reverse(const MatrixType &m)
MatrixType::Scalar Scalar
EIGEN_DEVICE_FUNC Index innerStride() const
#define EIGEN_DENSE_PUBLIC_INTERFACE(Derived)
EIGEN_DEVICE_FUNC void reverseInPlace()
ref_selector< MatrixType >::type MatrixTypeNested
Map< Matrix< T, Dynamic, Dynamic, ColMajor >, 0, OuterStride<> > matrix(T *data, int rows, int cols, int stride)
Expression of the reverse of a vector or matrix.
void run(Expr &expr, Dev &dev)
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
MatrixType::Nested m_matrix
EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf &a)