10 #ifndef EIGEN_EMULATE_CXX11_META_H 11 #define EIGEN_EMULATE_CXX11_META_H 27 template<
typename T,
typename Tail=empty_list>
struct type_list {
32 static const std::size_t
count = 1 + Tail::count;
51 template <std::
size_t index,
class TList>
struct get_type;
53 template <
class Head,
class Tail>
59 template <std::
size_t i,
class Head,
class Tail>
67 template <
typename T, T n>
70 static const T value = n;
98 type2val<T, V>, type2val<T, V>, type2val<T, V> >
::type type;
103 type2val<T, V>, type2val<T, V>, type2val<T, V>,
109 type2val<T, V>, type2val<T, V>, type2val<T, V>,
114 template <std::
size_t index,
class NList>
struct get;
116 template <std::
size_t i>
121 static const char value =
'\0';
124 template <std::
size_t i,
class Head>
129 static const char value =
'\0';
132 template <
class Head>
135 typedef typename Head::type
type;
136 static const type value = Head::value;
139 template <
class Head,
class Tail>
142 typedef typename Head::type
type;
143 static const type value = Head::value;
146 template <std::
size_t i,
class Head,
class Tail>
149 typedef typename Tail::HeadType::type
type;
150 static const type value =
get<i-1, Tail>::value;
158 static const int value = 1;
162 template<
int n,
typename t>
169 template<std::
size_t I,
class Head,
class Tail>
173 template<std::
size_t I,
class Head,
class Tail>
178 template <
class NList>
183 template<
typename t, std::
size_t n>
186 for (
size_t i = 0; i < n; ++i) { prod *= a[i]; }
198 for (
size_t i = 0; i < a.size(); ++i) { prod *= a[i]; }
203 template<std::
size_t I,
class T>
207 template<std::
size_t I,
class T>
213 template<
typename A,
typename B>
static inline bool run(
A a, B
b) {
return a +
b; }
216 template<
typename A,
typename B>
static inline bool run(
A a, B
b) {
return a *
b; }
220 template<
typename A,
typename B>
static inline bool run(
A a, B
b) {
return a &&
b; }
223 template<
typename A,
typename B>
static inline bool run(
A a, B
b) {
return a ||
b; }
227 template<
typename A,
typename B>
static inline bool run(
A a, B
b) {
return a ==
b; }
230 template<
typename A,
typename B>
static inline bool run(
A a, B
b) {
return a !=
b; }
233 template<
typename A,
typename B>
static inline bool run(
A a, B
b) {
return a <
b; }
236 template<
typename A,
typename B>
static inline bool run(
A a, B
b) {
return a <=
b; }
240 template<
typename A,
typename B>
static inline bool run(
A a, B
b) {
return a >
b; }
243 template<
typename A,
typename B>
static inline bool run(
A a, B
b) {
return a >=
b; }
247 template<
typename A>
static inline bool run(
A a) {
return !a; }
250 template<
typename A>
static inline bool run(
A a) {
return -a; }
253 template<
typename A>
static inline bool run(
A a) {
return a >= 0; }
257 template<
typename Reducer,
typename Op,
typename A, std::
size_t N>
262 for (
size_t i = 2; i <
N; ++i) {
269 template<
typename Reducer,
typename Op,
typename A>
276 template<
typename Reducer,
typename Op,
typename A, std::
size_t N>
281 template<
typename Reducer,
typename Op,
typename A,
typename B, std::
size_t N>
286 for (
size_t i = 2; i <
N; ++i) {
293 template<
typename Reducer,
typename Op,
typename A,
typename B>
300 template<
typename Reducer,
typename Op,
typename A,
typename B, std::
size_t N>
311 #endif // EIGEN_EMULATE_CXX11_META_H static bool run(const array< A, 1 > &a, const array< B, 1 > &b)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t array_prod(const Sizes< Indices... > &)
#define EIGEN_STRONG_INLINE
make_type_list< T2, T3, T4, T5, T6, T7, T8 >::type tailresult
type_list< T1, tailresult > type
static bool run(A a, B b)
get_type< i-1, Tail >::type type
static bool run(A a, B b)
make_type_list< type2val< T, V > >::type type
make_type_list< type2val< T, V >, type2val< T, V >, type2val< T, V > >::type type
array< t, n > repeat(t v)
Tail::HeadType::type type
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
static bool run(A a, B b)
static bool run(A a, B b)
static bool run(A a, B b)
make_type_list< type2val< T, V >, type2val< T, V >, type2val< T, V >, type2val< T, V >, type2val< T, V >, type2val< T, V >, type2val< T, V > >::type type
make_type_list< type2val< T, V >, type2val< T, V >, type2val< T, V >, type2val< T, V >, type2val< T, V > >::type type
bool array_apply_and_reduce(const array< A, N > &a)
static bool run(A a, B b)
static bool run(A a, B b)
bool array_zip_and_reduce(const array< A, N > &a, const array< B, N > &b)
make_type_list< type2val< T, V >, type2val< T, V >, type2val< T, V >, type2val< T, V > >::type type
make_type_list< type2val< T, V >, type2val< T, V >, type2val< T, V >, type2val< T, V >, type2val< T, V >, type2val< T, V >, type2val< T, V >, type2val< T, V > >::type type
static bool run(A a, B b)
make_type_list< type2val< T, V >, type2val< T, V > >::type type
const Index array_get(DimensionList< Index, Rank > &)
static const std::size_t count
make_type_list< type2val< T, V >, type2val< T, V >, type2val< T, V >, type2val< T, V >, type2val< T, V >, type2val< T, V > >::type type
static bool run(const array< A, N > &a, const array< B, N > &b)
static bool run(A a, B b)
static bool run(const array< A, N > &a)
void run(Expr &expr, Dev &dev)
static bool run(A a, B b)
EIGEN_DEVICE_FUNC const Scalar & b
static bool run(const array< A, 1 > &a)