11 #ifndef EIGEN_NESTBYVALUE_H 12 #define EIGEN_NESTBYVALUE_H 17 template<
typename ExpressionType>
42 EIGEN_DEVICE_FUNC explicit inline
NestByValue(const ExpressionType& matrix) : m_expression(matrix) {}
44 EIGEN_DEVICE_FUNC
inline Index rows()
const {
return m_expression.rows(); }
45 EIGEN_DEVICE_FUNC
inline Index cols()
const {
return m_expression.cols(); }
46 EIGEN_DEVICE_FUNC
inline Index outerStride()
const {
return m_expression.outerStride(); }
47 EIGEN_DEVICE_FUNC
inline Index innerStride()
const {
return m_expression.innerStride(); }
51 return m_expression.coeff(row, col);
56 return m_expression.const_cast_derived().coeffRef(row, col);
59 EIGEN_DEVICE_FUNC
inline const CoeffReturnType
coeff(
Index index)
const 61 return m_expression.coeff(index);
66 return m_expression.const_cast_derived().coeffRef(index);
69 template<
int LoadMode>
72 return m_expression.template packet<LoadMode>(
row,
col);
75 template<
int LoadMode>
78 m_expression.const_cast_derived().template writePacket<LoadMode>(
row,
col, x);
81 template<
int LoadMode>
84 return m_expression.template packet<LoadMode>(index);
87 template<
int LoadMode>
90 m_expression.const_cast_derived().template writePacket<LoadMode>(index, x);
93 EIGEN_DEVICE_FUNC
operator const ExpressionType&()
const {
return m_expression; }
101 template<
typename Derived>
110 #endif // EIGEN_NESTBYVALUE_H internal::dense_xpr_base< NestByValue >::type Base
EIGEN_DEVICE_FUNC Scalar & coeffRef(Index row, Index col)
EIGEN_DEVICE_FUNC Index innerStride() const
EIGEN_DEVICE_FUNC const CoeffReturnType coeff(Index index) const
EIGEN_DEVICE_FUNC Index outerStride() const
EIGEN_DEVICE_FUNC Index rows() const
const PacketScalar packet(Index row, Index col) const
const ExpressionType m_expression
EIGEN_DEVICE_FUNC ColXpr col(Index i)
This is the const version of col().
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
EIGEN_DEVICE_FUNC RowXpr row(Index i)
This is the const version of row(). */.
void writePacket(Index index, const PacketScalar &x)
Expression which must be nested by value.
EIGEN_DEVICE_FUNC const CoeffReturnType coeff(Index row, Index col) const
EIGEN_DEVICE_FUNC Scalar & coeffRef(Index index)
#define EIGEN_DENSE_PUBLIC_INTERFACE(Derived)
EIGEN_DEVICE_FUNC const NestByValue< Derived > nestByValue() const
EIGEN_DEVICE_FUNC Index cols() const
void writePacket(Index row, Index col, const PacketScalar &x)
const PacketScalar packet(Index index) const