diff options
Diffstat (limited to 'Eigen/src/Core/CwiseUnaryOp.h')
-rw-r--r-- | Eigen/src/Core/CwiseUnaryOp.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Eigen/src/Core/CwiseUnaryOp.h b/Eigen/src/Core/CwiseUnaryOp.h index 7c466d8c2..881853d28 100644 --- a/Eigen/src/Core/CwiseUnaryOp.h +++ b/Eigen/src/Core/CwiseUnaryOp.h @@ -90,6 +90,17 @@ class CwiseUnaryOp : ei_no_assignment_operator, return m_functor.packetOp(m_matrix.template packet<LoadMode>(row, col)); } + inline const Scalar _coeff(int index) const + { + return m_functor(m_matrix.coeff(index)); + } + + template<int LoadMode> + inline PacketScalar _packet(int index) const + { + return m_functor.packetOp(m_matrix.template packet<LoadMode>(index)); + } + protected: const typename MatrixType::Nested m_matrix; const UnaryOp m_functor; |