move the strides API to DenseCoeffsBase,

and various fixes to make stuff compile after my big changes
This commit is contained in:
Benoit Jacob
2010-05-08 16:00:05 -04:00
parent 0e2a480466
commit 7cbb84b046
5 changed files with 97 additions and 53 deletions

View File

@@ -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));
}