From 4716040703be1ee906439385d20475dcddad5ce3 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Mon, 25 Oct 2010 10:15:22 -0400 Subject: bug #86 : use internal:: namespace instead of ei_ prefix --- Eigen/src/Core/CwiseUnaryView.h | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) (limited to 'Eigen/src/Core/CwiseUnaryView.h') diff --git a/Eigen/src/Core/CwiseUnaryView.h b/Eigen/src/Core/CwiseUnaryView.h index 37c58223e..8b5a69513 100644 --- a/Eigen/src/Core/CwiseUnaryView.h +++ b/Eigen/src/Core/CwiseUnaryView.h @@ -38,39 +38,42 @@ * * \sa MatrixBase::unaryViewExpr(const CustomUnaryOp &) const, class CwiseUnaryOp */ + +namespace internal { template -struct ei_traits > - : ei_traits +struct traits > + : traits { - typedef typename ei_result_of< - ViewOp(typename ei_traits::Scalar) + typedef typename result_of< + ViewOp(typename traits::Scalar) >::type Scalar; typedef typename MatrixType::Nested MatrixTypeNested; - typedef typename ei_cleantype::type _MatrixTypeNested; + typedef typename cleantype::type _MatrixTypeNested; enum { - Flags = (ei_traits<_MatrixTypeNested>::Flags & (HereditaryBits | LvalueBit | LinearAccessBit | DirectAccessBit)), - CoeffReadCost = ei_traits<_MatrixTypeNested>::CoeffReadCost + ei_functor_traits::Cost, - MatrixTypeInnerStride = ei_inner_stride_at_compile_time::ret, + Flags = (traits<_MatrixTypeNested>::Flags & (HereditaryBits | LvalueBit | LinearAccessBit | DirectAccessBit)), + CoeffReadCost = traits<_MatrixTypeNested>::CoeffReadCost + functor_traits::Cost, + MatrixTypeInnerStride = inner_stride_at_compile_time::ret, // need to cast the sizeof's from size_t to int explicitly, otherwise: // "error: no integral type can represent all of the enumerator values InnerStrideAtCompileTime = MatrixTypeInnerStride == Dynamic ? int(Dynamic) : int(MatrixTypeInnerStride) - * int(sizeof(typename ei_traits::Scalar) / sizeof(Scalar)), - OuterStrideAtCompileTime = ei_outer_stride_at_compile_time::ret + * int(sizeof(typename traits::Scalar) / sizeof(Scalar)), + OuterStrideAtCompileTime = outer_stride_at_compile_time::ret }; }; +} template class CwiseUnaryViewImpl; template -class CwiseUnaryView : ei_no_assignment_operator, - public CwiseUnaryViewImpl::StorageKind> +class CwiseUnaryView : internal::no_assignment_operator, + public CwiseUnaryViewImpl::StorageKind> { public: - typedef typename CwiseUnaryViewImpl::StorageKind>::Base Base; + typedef typename CwiseUnaryViewImpl::StorageKind>::Base Base; EIGEN_GENERIC_PUBLIC_INTERFACE(CwiseUnaryView) inline CwiseUnaryView(const MatrixType& mat, const ViewOp& func = ViewOp()) @@ -85,33 +88,33 @@ class CwiseUnaryView : ei_no_assignment_operator, const ViewOp& functor() const { return m_functor; } /** \returns the nested expression */ - const typename ei_cleantype::type& + const typename internal::cleantype::type& nestedExpression() const { return m_matrix; } /** \returns the nested expression */ - typename ei_cleantype::type& + typename internal::cleantype::type& nestedExpression() { return m_matrix.const_cast_derived(); } protected: // FIXME changed from MatrixType::Nested because of a weird compilation error with sun CC - const typename ei_nested::type m_matrix; + const typename internal::nested::type m_matrix; ViewOp m_functor; }; template class CwiseUnaryViewImpl - : public ei_dense_xpr_base< CwiseUnaryView >::type + : public internal::dense_xpr_base< CwiseUnaryView >::type { public: typedef CwiseUnaryView Derived; - typedef typename ei_dense_xpr_base< CwiseUnaryView >::type Base; + typedef typename internal::dense_xpr_base< CwiseUnaryView >::type Base; EIGEN_DENSE_PUBLIC_INTERFACE(Derived) inline Index innerStride() const { - return derived().nestedExpression().innerStride() * sizeof(typename ei_traits::Scalar) / sizeof(Scalar); + return derived().nestedExpression().innerStride() * sizeof(typename internal::traits::Scalar) / sizeof(Scalar); } inline Index outerStride() const -- cgit v1.2.3