From 7cbb84b0460e4537112273954f2efe3448df5631 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Sat, 8 May 2010 16:00:05 -0400 Subject: move the strides API to DenseCoeffsBase, and various fixes to make stuff compile after my big changes --- Eigen/src/Core/CwiseUnaryView.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Eigen/src/Core/CwiseUnaryView.h') diff --git a/Eigen/src/Core/CwiseUnaryView.h b/Eigen/src/Core/CwiseUnaryView.h index 036bff8fb..9cdd03477 100644 --- a/Eigen/src/Core/CwiseUnaryView.h +++ b/Eigen/src/Core/CwiseUnaryView.h @@ -91,7 +91,7 @@ class CwiseUnaryView : ei_no_assignment_operator, protected: // FIXME changed from MatrixType::Nested because of a weird compilation error with sun CC const typename ei_nested::type m_matrix; - const ViewOp m_functor; + ViewOp m_functor; }; template @@ -102,6 +102,8 @@ class CwiseUnaryViewImpl public: + typedef typename ei_dense_xpr_base< CwiseUnaryView >::type Base; + inline int innerStride() const { return derived().nestedExpression().innerStride() * sizeof(typename ei_traits::Scalar) / sizeof(Scalar); @@ -112,15 +114,14 @@ class CwiseUnaryViewImpl return derived().nestedExpression().outerStride(); } - typedef typename ei_dense_xpr_base >::type Base; EIGEN_DENSE_PUBLIC_INTERFACE(Derived) - EIGEN_STRONG_INLINE const Scalar coeff(int row, int col) const + EIGEN_STRONG_INLINE CoeffReturnType coeff(int row, int col) const { return derived().functor()(derived().nestedExpression().coeff(row, col)); } - EIGEN_STRONG_INLINE const Scalar coeff(int index) const + EIGEN_STRONG_INLINE CoeffReturnType coeff(int index) const { return derived().functor()(derived().nestedExpression().coeff(index)); } -- cgit v1.2.3