diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-10-25 10:15:22 -0400 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-10-25 10:15:22 -0400 |
commit | 4716040703be1ee906439385d20475dcddad5ce3 (patch) | |
tree | 8efd3cf3007d8360e66f38e2d280127cbb70daa6 /Eigen/src/Core/BooleanRedux.h | |
parent | ca85a1f6c5fc33ac382aa2d7ba2da63d55d3223e (diff) |
bug #86 : use internal:: namespace instead of ei_ prefix
Diffstat (limited to 'Eigen/src/Core/BooleanRedux.h')
-rw-r--r-- | Eigen/src/Core/BooleanRedux.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/Eigen/src/Core/BooleanRedux.h b/Eigen/src/Core/BooleanRedux.h index 9f9d1b594..5c3444a57 100644 --- a/Eigen/src/Core/BooleanRedux.h +++ b/Eigen/src/Core/BooleanRedux.h @@ -25,8 +25,10 @@ #ifndef EIGEN_ALLANDANY_H #define EIGEN_ALLANDANY_H +namespace internal { + template<typename Derived, int UnrollCount> -struct ei_all_unroller +struct all_unroller { enum { col = (UnrollCount-1) / Derived::RowsAtCompileTime, @@ -35,24 +37,24 @@ struct ei_all_unroller inline static bool run(const Derived &mat) { - return ei_all_unroller<Derived, UnrollCount-1>::run(mat) && mat.coeff(row, col); + return all_unroller<Derived, UnrollCount-1>::run(mat) && mat.coeff(row, col); } }; template<typename Derived> -struct ei_all_unroller<Derived, 1> +struct all_unroller<Derived, 1> { inline static bool run(const Derived &mat) { return mat.coeff(0, 0); } }; template<typename Derived> -struct ei_all_unroller<Derived, Dynamic> +struct all_unroller<Derived, Dynamic> { inline static bool run(const Derived &) { return false; } }; template<typename Derived, int UnrollCount> -struct ei_any_unroller +struct any_unroller { enum { col = (UnrollCount-1) / Derived::RowsAtCompileTime, @@ -61,22 +63,24 @@ struct ei_any_unroller inline static bool run(const Derived &mat) { - return ei_any_unroller<Derived, UnrollCount-1>::run(mat) || mat.coeff(row, col); + return any_unroller<Derived, UnrollCount-1>::run(mat) || mat.coeff(row, col); } }; template<typename Derived> -struct ei_any_unroller<Derived, 1> +struct any_unroller<Derived, 1> { inline static bool run(const Derived &mat) { return mat.coeff(0, 0); } }; template<typename Derived> -struct ei_any_unroller<Derived, Dynamic> +struct any_unroller<Derived, Dynamic> { inline static bool run(const Derived &) { return false; } }; +} // end namespace internal + /** \returns true if all coefficients are true * * Example: \include MatrixBase_all.cpp @@ -94,7 +98,7 @@ inline bool DenseBase<Derived>::all() const && SizeAtCompileTime * (CoeffReadCost + NumTraits<Scalar>::AddCost) <= EIGEN_UNROLLING_LIMIT }; if(unroll) - return ei_all_unroller<Derived, + return internal::all_unroller<Derived, unroll ? int(SizeAtCompileTime) : Dynamic >::run(derived()); else @@ -120,7 +124,7 @@ inline bool DenseBase<Derived>::any() const && SizeAtCompileTime * (CoeffReadCost + NumTraits<Scalar>::AddCost) <= EIGEN_UNROLLING_LIMIT }; if(unroll) - return ei_any_unroller<Derived, + return internal::any_unroller<Derived, unroll ? int(SizeAtCompileTime) : Dynamic >::run(derived()); else |