10 #ifndef EIGEN_CWISE_UNARY_VIEW_H
11 #define EIGEN_CWISE_UNARY_VIEW_H
18 template<
typename ViewOp,
typename MatrixType,
typename Str
ideType>
19 struct traits<CwiseUnaryView<ViewOp,
MatrixType, StrideType> >
22 typedef typename result_of<
23 ViewOp(
const typename traits<MatrixType>::Scalar&)
25 typedef typename MatrixType::Nested MatrixTypeNested;
26 typedef remove_all_t<MatrixTypeNested> MatrixTypeNested_;
28 FlagsLvalueBit = is_lvalue<MatrixType>::value ?
LvalueBit : 0,
30 MatrixTypeInnerStride = inner_stride_at_compile_time<MatrixType>::ret,
33 InnerStrideAtCompileTime = StrideType::InnerStrideAtCompileTime == 0
34 ? (MatrixTypeInnerStride ==
Dynamic
36 : int(MatrixTypeInnerStride) * int(sizeof(typename traits<
MatrixType>::Scalar) / sizeof(Scalar)))
37 : int(StrideType::InnerStrideAtCompileTime),
39 OuterStrideAtCompileTime = StrideType::OuterStrideAtCompileTime == 0
42 : outer_stride_at_compile_time<
MatrixType>::ret * int(sizeof(typename traits<
MatrixType>::Scalar) / sizeof(Scalar)))
43 : int(StrideType::OuterStrideAtCompileTime)
48 template<
typename ViewOp,
typename MatrixType,
typename Str
ideType,
typename StorageKind>
49 class CwiseUnaryViewImpl;
64 template<
typename ViewOp,
typename MatrixType,
typename Str
ideType>
75 : m_matrix(
mat), m_functor(func) {}
101 template<
typename ViewOp,
typename XprType,
typename Str
ideType,
typename StorageKind>
103 :
public internal::generic_xpr_base<CwiseUnaryView<ViewOp, XprType, StrideType> >::type
106 typedef typename internal::generic_xpr_base<CwiseUnaryView<ViewOp, XprType, StrideType> >::type
Base;
109 template<
typename ViewOp,
typename MatrixType,
typename Str
ideType>
111 :
public internal::dense_xpr_base< CwiseUnaryView<ViewOp, MatrixType, StrideType> >::type
116 typedef typename internal::dense_xpr_base< CwiseUnaryView<ViewOp, MatrixType,StrideType> >::type
Base;
126 return StrideType::InnerStrideAtCompileTime != 0
127 ? int(StrideType::InnerStrideAtCompileTime)
128 : derived().nestedExpression().innerStride() *
sizeof(
typename internal::traits<MatrixType>::Scalar) /
sizeof(Scalar);
133 return StrideType::OuterStrideAtCompileTime != 0
134 ? int(StrideType::OuterStrideAtCompileTime)
135 : derived().nestedExpression().outerStride() *
sizeof(
typename internal::traits<MatrixType>::Scalar) /
sizeof(Scalar);
#define EIGEN_GENERIC_PUBLIC_INTERFACE(Derived)
#define EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(Derived)
#define EIGEN_DEVICE_FUNC
#define EIGEN_DENSE_PUBLIC_INTERFACE(Derived)
#define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived)
Matrix< float, 1, Dynamic > MatrixType
const Scalar * data() const
CwiseUnaryView< ViewOp, MatrixType, StrideType > Derived
EIGEN_CONSTEXPR Index innerStride() const
EIGEN_CONSTEXPR Index outerStride() const
internal::dense_xpr_base< CwiseUnaryView< ViewOp, MatrixType, StrideType > >::type Base
internal::generic_xpr_base< CwiseUnaryView< ViewOp, XprType, StrideType > >::type Base
Generic lvalue expression of a coefficient-wise unary operator of a matrix or a vector.
EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
internal::ref_selector< MatrixType >::non_const_type MatrixTypeNested
MatrixTypeNested m_matrix
internal::remove_all_t< MatrixType > NestedExpression
const ViewOp & functor() const
std::remove_reference_t< MatrixTypeNested > & nestedExpression()
CwiseUnaryViewImpl< ViewOp, MatrixType, StrideType, typename internal::traits< MatrixType >::StorageKind >::Base Base
const internal::remove_all_t< MatrixTypeNested > & nestedExpression() const
The matrix class, also used for vectors and row-vectors.
const unsigned int DirectAccessBit
const unsigned int LvalueBit
const unsigned int RowMajorBit
typename remove_all< T >::type remove_all_t
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.