diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-05-08 16:00:05 -0400 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-05-08 16:00:05 -0400 |
commit | 7cbb84b0460e4537112273954f2efe3448df5631 (patch) | |
tree | ac2b648459302e698f4f486d48cc6685895f9697 /Eigen/src/Core/CwiseUnaryView.h | |
parent | 0e2a480466220ea2054b8dbe68569b3440918174 (diff) |
move the strides API to DenseCoeffsBase,
and various fixes to make stuff compile after my big changes
Diffstat (limited to 'Eigen/src/Core/CwiseUnaryView.h')
-rw-r--r-- | Eigen/src/Core/CwiseUnaryView.h | 9 |
1 files changed, 5 insertions, 4 deletions
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<MatrixType>::type m_matrix; - const ViewOp m_functor; + ViewOp m_functor; }; template<typename ViewOp, typename MatrixType> @@ -102,6 +102,8 @@ class CwiseUnaryViewImpl<ViewOp,MatrixType,Dense> public: + typedef typename ei_dense_xpr_base< CwiseUnaryView<ViewOp, MatrixType> >::type Base; + inline int innerStride() const { return derived().nestedExpression().innerStride() * sizeof(typename ei_traits<MatrixType>::Scalar) / sizeof(Scalar); @@ -112,15 +114,14 @@ class CwiseUnaryViewImpl<ViewOp,MatrixType,Dense> return derived().nestedExpression().outerStride(); } - typedef typename ei_dense_xpr_base<CwiseUnaryView<ViewOp, MatrixType> >::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)); } |