From aaaade4b3d66d67d2c08af3372c3965e7255b2e8 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Sun, 30 May 2010 16:00:58 -0400 Subject: the Index types change. As discussed on the list (too long to explain here). --- Eigen/src/Core/CwiseUnaryView.h | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'Eigen/src/Core/CwiseUnaryView.h') diff --git a/Eigen/src/Core/CwiseUnaryView.h b/Eigen/src/Core/CwiseUnaryView.h index 9cdd03477..11a23c66a 100644 --- a/Eigen/src/Core/CwiseUnaryView.h +++ b/Eigen/src/Core/CwiseUnaryView.h @@ -74,8 +74,8 @@ class CwiseUnaryView : ei_no_assignment_operator, EIGEN_INHERIT_ASSIGNMENT_OPERATORS(CwiseUnaryView) - EIGEN_STRONG_INLINE int rows() const { return m_matrix.rows(); } - EIGEN_STRONG_INLINE int cols() const { return m_matrix.cols(); } + EIGEN_STRONG_INLINE Index rows() const { return m_matrix.rows(); } + EIGEN_STRONG_INLINE Index cols() const { return m_matrix.cols(); } /** \returns the functor representing unary operation */ const ViewOp& functor() const { return m_functor; } @@ -98,40 +98,39 @@ template class CwiseUnaryViewImpl : public ei_dense_xpr_base< CwiseUnaryView >::type { - typedef CwiseUnaryView Derived; - public: + typedef CwiseUnaryView Derived; typedef typename ei_dense_xpr_base< CwiseUnaryView >::type Base; - inline int innerStride() const + EIGEN_DENSE_PUBLIC_INTERFACE(Derived) + + inline Index innerStride() const { return derived().nestedExpression().innerStride() * sizeof(typename ei_traits::Scalar) / sizeof(Scalar); } - inline int outerStride() const + inline Index outerStride() const { return derived().nestedExpression().outerStride(); } - EIGEN_DENSE_PUBLIC_INTERFACE(Derived) - - EIGEN_STRONG_INLINE CoeffReturnType coeff(int row, int col) const + EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const { return derived().functor()(derived().nestedExpression().coeff(row, col)); } - EIGEN_STRONG_INLINE CoeffReturnType coeff(int index) const + EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const { return derived().functor()(derived().nestedExpression().coeff(index)); } - EIGEN_STRONG_INLINE Scalar& coeffRef(int row, int col) + EIGEN_STRONG_INLINE Scalar& coeffRef(Index row, Index col) { return derived().functor()(const_cast_derived().nestedExpression().coeffRef(row, col)); } - EIGEN_STRONG_INLINE Scalar& coeffRef(int index) + EIGEN_STRONG_INLINE Scalar& coeffRef(Index index) { return derived().functor()(const_cast_derived().nestedExpression().coeffRef(index)); } -- cgit v1.2.3