11 #ifndef EIGEN_CWISE_UNARY_OP_H 12 #define EIGEN_CWISE_UNARY_OP_H 37 template<
typename UnaryOp,
typename XprType>
44 typedef typename XprType::Nested XprTypeNested;
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>
68 : m_xpr(xpr), m_functor(
func) {}
70 EIGEN_STRONG_INLINE Index rows()
const {
return m_xpr.rows(); }
71 EIGEN_STRONG_INLINE Index cols()
const {
return m_xpr.cols(); }
74 const UnaryOp&
functor()
const {
return m_functor; }
85 typename XprType::Nested m_xpr;
86 const UnaryOp m_functor;
91 template<
typename UnaryOp,
typename XprType>
99 EIGEN_DENSE_PUBLIC_INTERFACE(Derived)
101 EIGEN_STRONG_INLINE
const Scalar coeff(Index rowId, Index colId)
const 103 return derived().functor()(derived().nestedExpression().coeff(rowId, colId));
106 template<
int LoadMode>
107 EIGEN_STRONG_INLINE PacketScalar packet(Index rowId, Index colId)
const 109 return derived().functor().packetOp(derived().nestedExpression().
template packet<LoadMode>(rowId, colId));
112 EIGEN_STRONG_INLINE
const Scalar coeff(Index index)
const 114 return derived().functor()(derived().nestedExpression().coeff(index));
117 template<
int LoadMode>
118 EIGEN_STRONG_INLINE PacketScalar packet(Index index)
const 120 return derived().functor().packetOp(derived().nestedExpression().
template packet<LoadMode>(index));
126 #endif // EIGEN_CWISE_UNARY_OP_H Definition: gtest_unittest.cc:5031
const internal::remove_all< typename XprType::Nested >::type & nestedExpression() const
Definition: CwiseUnaryOp.h:78
iterative scaling algorithm to equilibrate rows and column norms in matrices
Definition: TestIMU_Common.h:87
Definition: XprHelper.h:32
const unsigned int PacketAccessBit
Short version: means the expression might be vectorized.
Definition: Constants.h:81
Definition: XprHelper.h:350
const unsigned int AlignedBit
means the first coefficient packet is guaranteed to be aligned
Definition: Constants.h:147
internal::remove_all< typename XprType::Nested >::type & nestedExpression()
Definition: CwiseUnaryOp.h:82
const UnaryOp & functor() const
Definition: CwiseUnaryOp.h:74
Definition: benchGeometry.cpp:23
Definition: BandTriangularSolver.h:13
Definition: XprHelper.h:89
Definition: CwiseUnaryOp.h:56
The type used to identify a dense storage.
Definition: Constants.h:428
Generic expression where a coefficient-wise unary operator is applied to an expression.
Definition: CwiseUnaryOp.h:59
const unsigned int LinearAccessBit
Short version: means the expression can be seen as 1D vector.
Definition: Constants.h:117
Definition: ForwardDeclarations.h:17
double Scalar
Common scalar type.
Definition: FlexibleKalmanBase.h:48