10 #ifndef EIGEN_ARRAYWRAPPER_H 11 #define EIGEN_ARRAYWRAPPER_H 27 template<
typename ExpressionType>
29 :
public traits<typename remove_all<typename ExpressionType::Nested>::type >
35 Flags = Flags0 & ~NestByRefBit
40 template<
typename ExpressionType>
47 typedef typename internal::remove_all<ExpressionType>::type
NestedExpression;
53 >::type ScalarWithConstIfNotLvalue;
55 typedef typename internal::ref_selector<ExpressionType>::non_const_type NestedExpressionType;
60 explicit EIGEN_STRONG_INLINE
ArrayWrapper(ExpressionType& matrix) : m_expression(matrix) {}
63 inline Index rows()
const {
return m_expression.rows(); }
65 inline Index cols()
const {
return m_expression.cols(); }
67 inline Index outerStride()
const {
return m_expression.outerStride(); }
69 inline Index innerStride()
const {
return m_expression.innerStride(); }
72 inline ScalarWithConstIfNotLvalue* data() {
return m_expression.data(); }
74 inline const Scalar* data()
const {
return m_expression.data(); }
77 inline const Scalar& coeffRef(
Index rowId,
Index colId)
const 79 return m_expression.coeffRef(rowId, colId);
83 inline const Scalar& coeffRef(
Index index)
const 85 return m_expression.coeffRef(index);
88 template<
typename Dest>
90 inline void evalTo(Dest& dst)
const { dst = m_expression; }
92 const typename internal::remove_all<NestedExpressionType>::type&
94 nestedExpression()
const 109 NestedExpressionType m_expression;
124 template<
typename ExpressionType>
126 :
public traits<typename remove_all<typename ExpressionType::Nested>::type >
132 Flags = Flags0 & ~NestByRefBit
137 template<
typename ExpressionType>
150 >::type ScalarWithConstIfNotLvalue;
152 typedef typename internal::ref_selector<ExpressionType>::non_const_type NestedExpressionType;
154 using Base::coeffRef;
157 explicit inline MatrixWrapper(ExpressionType& matrix) : m_expression(matrix) {}
160 inline Index rows()
const {
return m_expression.rows(); }
162 inline Index cols()
const {
return m_expression.cols(); }
164 inline Index outerStride()
const {
return m_expression.outerStride(); }
166 inline Index innerStride()
const {
return m_expression.innerStride(); }
169 inline ScalarWithConstIfNotLvalue* data() {
return m_expression.data(); }
171 inline const Scalar* data()
const {
return m_expression.data(); }
174 inline const Scalar& coeffRef(
Index rowId,
Index colId)
const 176 return m_expression.derived().coeffRef(rowId, colId);
180 inline const Scalar& coeffRef(
Index index)
const 182 return m_expression.coeffRef(index);
187 nestedExpression()
const 202 NestedExpressionType m_expression;
207 #endif // EIGEN_ARRAYWRAPPER_H EIGEN_DEVICE_FUNC void resize(Index rows, Index cols)
Forwards the resizing request to the nested expression.
Definition: ArrayWrapper.h:106
internal::traits< Derived >::Scalar Scalar
The numeric type of the expression' coefficients, e.g.
Definition: DenseBase.h:66
Expression of a mathematical vector or matrix as an array object.
Definition: ArrayWrapper.h:41
EIGEN_DEVICE_FUNC void resize(Index newSize)
Forwards the resizing request to the nested expression.
Definition: ArrayWrapper.h:102
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:85
The type used to identify a matrix expression.
Definition: Constants.h:506
Expression of an array as a mathematical vector or matrix.
Definition: ArrayBase.h:15
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:33
Base class for all 1D and 2D array, and related expressions.
Definition: ArrayBase.h:39
EIGEN_DEVICE_FUNC void resize(Index newSize)
Forwards the resizing request to the nested expression.
Definition: ArrayWrapper.h:195
Definition: BandTriangularSolver.h:13
EIGEN_DEVICE_FUNC void resize(Index rows, Index cols)
Forwards the resizing request to the nested expression.
Definition: ArrayWrapper.h:199
The type used to identify an array expression.
Definition: Constants.h:509
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:48
Definition: ForwardDeclarations.h:17
Definition: XprHelper.h:630