diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-05-30 16:00:58 -0400 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-05-30 16:00:58 -0400 |
commit | aaaade4b3d66d67d2c08af3372c3965e7255b2e8 (patch) | |
tree | 76dfaefb014333b2f98c6db660454771655ea8b7 /Eigen/src/Core/CwiseUnaryOp.h | |
parent | faa3ff3be6a02b57c6cb05edc87375e54ab96606 (diff) |
the Index types change.
As discussed on the list (too long to explain here).
Diffstat (limited to 'Eigen/src/Core/CwiseUnaryOp.h')
-rw-r--r-- | Eigen/src/Core/CwiseUnaryOp.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/Eigen/src/Core/CwiseUnaryOp.h b/Eigen/src/Core/CwiseUnaryOp.h index 8f95b69b0..da398d131 100644 --- a/Eigen/src/Core/CwiseUnaryOp.h +++ b/Eigen/src/Core/CwiseUnaryOp.h @@ -76,8 +76,8 @@ class CwiseUnaryOp : ei_no_assignment_operator, inline CwiseUnaryOp(const XprType& xpr, const UnaryOp& func = UnaryOp()) : m_xpr(xpr), m_functor(func) {} - EIGEN_STRONG_INLINE int rows() const { return m_xpr.rows(); } - EIGEN_STRONG_INLINE int cols() const { return m_xpr.cols(); } + EIGEN_STRONG_INLINE Index rows() const { return m_xpr.rows(); } + EIGEN_STRONG_INLINE Index cols() const { return m_xpr.cols(); } /** \returns the functor representing the unary operation */ const UnaryOp& functor() const { return m_functor; } @@ -100,32 +100,31 @@ class CwiseUnaryOp : ei_no_assignment_operator, template<typename UnaryOp, typename XprType> class CwiseUnaryOpImpl<UnaryOp,XprType,Dense> : public ei_dense_xpr_base<CwiseUnaryOp<UnaryOp, XprType> >::type - { - typedef CwiseUnaryOp<UnaryOp, XprType> Derived; - +{ public: + typedef CwiseUnaryOp<UnaryOp, XprType> Derived; typedef typename ei_dense_xpr_base<CwiseUnaryOp<UnaryOp, XprType> >::type Base; EIGEN_DENSE_PUBLIC_INTERFACE(Derived) - EIGEN_STRONG_INLINE const Scalar coeff(int row, int col) const + EIGEN_STRONG_INLINE const Scalar coeff(Index row, Index col) const { return derived().functor()(derived().nestedExpression().coeff(row, col)); } template<int LoadMode> - EIGEN_STRONG_INLINE PacketScalar packet(int row, int col) const + EIGEN_STRONG_INLINE PacketScalar packet(Index row, Index col) const { return derived().functor().packetOp(derived().nestedExpression().template packet<LoadMode>(row, col)); } - EIGEN_STRONG_INLINE const Scalar coeff(int index) const + EIGEN_STRONG_INLINE const Scalar coeff(Index index) const { return derived().functor()(derived().nestedExpression().coeff(index)); } template<int LoadMode> - EIGEN_STRONG_INLINE PacketScalar packet(int index) const + EIGEN_STRONG_INLINE PacketScalar packet(Index index) const { return derived().functor().packetOp(derived().nestedExpression().template packet<LoadMode>(index)); } |