11 #ifndef EIGEN_CWISE_UNARY_OP_H 12 #define EIGEN_CWISE_UNARY_OP_H 37 template<
typename UnaryOp,
typename XprType>
42 UnaryOp(
typename XprType::Scalar)
47 Flags = _XprTypeNested::Flags & (
55 template<
typename UnaryOp,
typename XprType,
typename StorageKind>
58 template<
typename UnaryOp,
typename XprType>
60 public CwiseUnaryOpImpl<UnaryOp, XprType, typename internal::traits<XprType>::StorageKind>
67 inline
CwiseUnaryOp(const XprType& xpr, const UnaryOp& func = UnaryOp())
68 : m_xpr(xpr), m_functor(func) {}
74 const UnaryOp&
functor()
const {
return m_functor; }
91 template<
typename UnaryOp,
typename XprType>
103 return derived().functor()(derived().nestedExpression().coeff(rowId, colId));
106 template<
int LoadMode>
109 return derived().functor().packetOp(derived().nestedExpression().
template packet<LoadMode>(rowId, colId));
114 return derived().functor()(derived().nestedExpression().coeff(index));
117 template<
int LoadMode>
120 return derived().functor().packetOp(derived().nestedExpression().
template packet<LoadMode>(index));
126 #endif // EIGEN_CWISE_UNARY_OP_H #define EIGEN_GENERIC_PUBLIC_INTERFACE(Derived)
const UnaryOp & functor() const
EIGEN_STRONG_INLINE const Scalar coeff(Index index) const
EIGEN_STRONG_INLINE PacketScalar packet(Index index) const
#define EIGEN_STRONG_INLINE
EIGEN_STRONG_INLINE Index rows() const
const internal::remove_all< typename XprType::Nested >::type & nestedExpression() const
CwiseUnaryOpImpl< UnaryOp, XprType, typename internal::traits< XprType >::StorageKind >::Base Base
internal::dense_xpr_base< CwiseUnaryOp< UnaryOp, XprType > >::type Base
EIGEN_STRONG_INLINE PacketScalar packet(Index rowId, Index colId) const
const unsigned int PacketAccessBit
const unsigned int AlignedBit
const unsigned int HereditaryBits
XprType::Nested XprTypeNested
internal::remove_all< typename XprType::Nested >::type & nestedExpression()
CwiseUnaryOp< UnaryOp, XprType > Derived
#define EIGEN_DENSE_PUBLIC_INTERFACE(Derived)
Generic expression where a coefficient-wise unary operator is applied to an expression.
EIGEN_STRONG_INLINE Index cols() const
remove_reference< XprTypeNested >::type _XprTypeNested
const unsigned int LinearAccessBit
result_of< UnaryOp(typename XprType::Scalar) >::type Scalar