10 #ifndef EIGEN_CWISE_UNARY_VIEW_H
11 #define EIGEN_CWISE_UNARY_VIEW_H
16 template<
typename ViewOp,
typename MatrixType>
23 typedef typename MatrixType::Nested MatrixTypeNested;
24 typedef typename remove_all<MatrixTypeNested>::type _MatrixTypeNested;
31 InnerStrideAtCompileTime = MatrixTypeInnerStride ==
Dynamic
41 template<
typename ViewOp,
typename MatrixType,
typename StorageKind>
57 template<
typename ViewOp,
typename MatrixType>
65 typedef typename internal::remove_all<MatrixType>::type NestedExpression;
67 explicit inline CwiseUnaryView(MatrixType& mat,
const ViewOp& func = ViewOp())
68 : m_matrix(mat), m_functor(func) {}
72 EIGEN_STRONG_INLINE
Index rows()
const {
return m_matrix.rows(); }
73 EIGEN_STRONG_INLINE
Index cols()
const {
return m_matrix.cols(); }
76 const ViewOp&
functor()
const {
return m_functor; }
79 const typename internal::remove_all<MatrixTypeNested>::type&
83 typename internal::remove_reference<MatrixTypeNested>::type&
87 MatrixTypeNested m_matrix;
92 template<
typename ViewOp,
typename XprType,
typename StorageKind>
100 template<
typename ViewOp,
typename MatrixType>
109 EIGEN_DENSE_PUBLIC_INTERFACE(
Derived)
112 EIGEN_DEVICE_FUNC
inline Scalar* data() {
return &(this->coeffRef(0)); }
113 EIGEN_DEVICE_FUNC
inline const Scalar* data()
const {
return &(this->coeff(0)); }
115 EIGEN_DEVICE_FUNC
inline Index innerStride()
const
120 EIGEN_DEVICE_FUNC
inline Index outerStride()
const
130 #endif // EIGEN_CWISE_UNARY_VIEW_H