10 #ifndef EIGEN_ALLANDANY_H 11 #define EIGEN_ALLANDANY_H 17 template<
typename Derived,
int UnrollCount>
20 typedef typename Derived::ExpressionTraits Traits;
22 col = (UnrollCount-1) / Traits::RowsAtCompileTime,
23 row = (UnrollCount-1) % Traits::RowsAtCompileTime
26 static inline bool run(
const Derived &mat)
32 template<
typename Derived>
35 static inline bool run(
const Derived &) {
return true; }
38 template<
typename Derived>
41 static inline bool run(
const Derived &) {
return false; }
44 template<
typename Derived,
int UnrollCount>
47 typedef typename Derived::ExpressionTraits Traits;
49 col = (UnrollCount-1) / Traits::RowsAtCompileTime,
50 row = (UnrollCount-1) % Traits::RowsAtCompileTime
53 static inline bool run(
const Derived &mat)
59 template<
typename Derived>
62 static inline bool run(
const Derived & ) {
return false; }
65 template<
typename Derived>
68 static inline bool run(
const Derived &) {
return false; }
80 template<
typename Derived>
85 unroll = SizeAtCompileTime !=
Dynamic 88 Evaluator evaluator(derived());
93 for(
Index j = 0; j < cols(); ++j)
94 for(
Index i = 0; i < rows(); ++i)
95 if (!evaluator.coeff(i, j))
return false;
104 template<
typename Derived>
109 unroll = SizeAtCompileTime !=
Dynamic 112 Evaluator evaluator(derived());
117 for(
Index j = 0; j < cols(); ++j)
118 for(
Index i = 0; i < rows(); ++i)
119 if (evaluator.coeff(i, j))
return true;
128 template<
typename Derived>
131 return derived().template cast<bool>().
template cast<Index>().sum();
138 template<
typename Derived>
141 #if EIGEN_COMP_MSVC || (defined __FAST_MATH__) 142 return derived().array().isNaN().any();
144 return !((derived().array()==derived().array()).all());
152 template<
typename Derived>
155 #if EIGEN_COMP_MSVC || (defined __FAST_MATH__) 156 return derived().array().isFinite().all();
158 return !((derived()-derived()).hasNaN());
164 #endif // EIGEN_ALLANDANY_H bool allFinite() const
Definition: BooleanRedux.h:153
Definition: CoreEvaluators.h:90
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:85
Holds information about the various numeric (i.e.
Definition: NumTraits.h:150
bool hasNaN() const
Definition: BooleanRedux.h:139
Definition: BooleanRedux.h:45
bool all() const
Definition: BooleanRedux.h:81
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:33
bool any() const
Definition: BooleanRedux.h:105
Definition: BandTriangularSolver.h:13
Index count() const
Definition: BooleanRedux.h:129
const int Dynamic
This value means that a positive quantity (e.g., a size) is not known at compile-time, and that instead the value is stored in some runtime variable.
Definition: Constants.h:21
Definition: BooleanRedux.h:18