11 #ifndef EIGEN_CWISE_UNARY_OP_H
12 #define EIGEN_CWISE_UNARY_OP_H
17 template<
typename UnaryOp,
typename XprType>
22 UnaryOp(
const typename XprType::Scalar&)
24 typedef typename XprType::Nested XprTypeNested;
25 typedef typename remove_reference<XprTypeNested>::type _XprTypeNested;
32 template<
typename UnaryOp,
typename XprType,
typename StorageKind>
54 template<
typename UnaryOp,
typename XprType>
62 typedef typename internal::remove_all<XprType>::type NestedExpression;
64 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
65 explicit CwiseUnaryOp(
const XprType& xpr,
const UnaryOp& func = UnaryOp())
66 : m_xpr(xpr), m_functor(func) {}
68 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
69 Index rows()
const {
return m_xpr.rows(); }
70 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
71 Index cols()
const {
return m_xpr.cols(); }
74 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
75 const UnaryOp&
functor()
const {
return m_functor; }
78 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
79 const typename internal::remove_all<XprTypeNested>::type&
83 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
84 typename internal::remove_all<XprTypeNested>::type&
89 const UnaryOp m_functor;
93 template<
typename UnaryOp,
typename XprType,
typename StorageKind>
103 #endif // EIGEN_CWISE_UNARY_OP_H