aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/BooleanRedux.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2014-09-18 15:15:27 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2014-09-18 15:15:27 +0200
commit0ca43f7e9a654e32da0066163a8656415961e266 (patch)
treeed0da1fda3880f825eb8e9715546568deeee667f /Eigen/src/Core/BooleanRedux.h
parent8b3be4907da2cbf47ec15734b7f364e6e66bf4c3 (diff)
Remove deprecated code not used by evaluators
Diffstat (limited to 'Eigen/src/Core/BooleanRedux.h')
-rw-r--r--Eigen/src/Core/BooleanRedux.h51
1 files changed, 0 insertions, 51 deletions
diff --git a/Eigen/src/Core/BooleanRedux.h b/Eigen/src/Core/BooleanRedux.h
index 192e1db53..dac1887e0 100644
--- a/Eigen/src/Core/BooleanRedux.h
+++ b/Eigen/src/Core/BooleanRedux.h
@@ -17,18 +17,11 @@ namespace internal {
template<typename Derived, int UnrollCount>
struct all_unroller
{
-#ifdef EIGEN_TEST_EVALUATORS
typedef typename Derived::ExpressionTraits Traits;
enum {
col = (UnrollCount-1) / Traits::RowsAtCompileTime,
row = (UnrollCount-1) % Traits::RowsAtCompileTime
};
-#else
- enum {
- col = (UnrollCount-1) / Derived::RowsAtCompileTime,
- row = (UnrollCount-1) % Derived::RowsAtCompileTime
- };
-#endif
static inline bool run(const Derived &mat)
{
@@ -51,18 +44,11 @@ struct all_unroller<Derived, Dynamic>
template<typename Derived, int UnrollCount>
struct any_unroller
{
-#ifdef EIGEN_TEST_EVALUATORS
typedef typename Derived::ExpressionTraits Traits;
enum {
col = (UnrollCount-1) / Traits::RowsAtCompileTime,
row = (UnrollCount-1) % Traits::RowsAtCompileTime
};
-#else
- enum {
- col = (UnrollCount-1) / Derived::RowsAtCompileTime,
- row = (UnrollCount-1) % Derived::RowsAtCompileTime
- };
-#endif
static inline bool run(const Derived &mat)
{
@@ -94,7 +80,6 @@ struct any_unroller<Derived, Dynamic>
template<typename Derived>
inline bool DenseBase<Derived>::all() const
{
-#ifdef EIGEN_TEST_EVALUATORS
typedef typename internal::evaluator<Derived>::type Evaluator;
enum {
unroll = SizeAtCompileTime != Dynamic
@@ -112,24 +97,6 @@ inline bool DenseBase<Derived>::all() const
if (!evaluator.coeff(i, j)) return false;
return true;
}
-#else
- enum {
- unroll = SizeAtCompileTime != Dynamic
- && CoeffReadCost != Dynamic
- && NumTraits<Scalar>::AddCost != Dynamic
- && SizeAtCompileTime * (CoeffReadCost + NumTraits<Scalar>::AddCost) <= EIGEN_UNROLLING_LIMIT
- };
-
- if(unroll)
- return internal::all_unroller<Derived, unroll ? int(SizeAtCompileTime) : Dynamic>::run(derived());
- else
- {
- for(Index j = 0; j < cols(); ++j)
- for(Index i = 0; i < rows(); ++i)
- if (!coeff(i, j)) return false;
- return true;
- }
-#endif
}
/** \returns true if at least one coefficient is true
@@ -139,7 +106,6 @@ inline bool DenseBase<Derived>::all() const
template<typename Derived>
inline bool DenseBase<Derived>::any() const
{
-#ifdef EIGEN_TEST_EVALUATORS
typedef typename internal::evaluator<Derived>::type Evaluator;
enum {
unroll = SizeAtCompileTime != Dynamic
@@ -157,23 +123,6 @@ inline bool DenseBase<Derived>::any() const
if (evaluator.coeff(i, j)) return true;
return false;
}
-#else
- enum {
- unroll = SizeAtCompileTime != Dynamic
- && CoeffReadCost != Dynamic
- && NumTraits<Scalar>::AddCost != Dynamic
- && SizeAtCompileTime * (CoeffReadCost + NumTraits<Scalar>::AddCost) <= EIGEN_UNROLLING_LIMIT
- };
- if(unroll)
- return internal::any_unroller<Derived, unroll ? int(SizeAtCompileTime) : Dynamic>::run(derived());
- else
- {
- for(Index j = 0; j < cols(); ++j)
- for(Index i = 0; i < rows(); ++i)
- if (coeff(i, j)) return true;
- return false;
- }
-#endif
}
/** \returns the number of coefficients which evaluate to true