17 using Eigen::internal::numeric_list;
18 using Eigen::internal::gen_numeric_list;
19 using Eigen::internal::gen_numeric_list_reversed;
20 using Eigen::internal::gen_numeric_list_swapped_pair;
23 using Eigen::internal::mconcat;
24 using Eigen::internal::take;
25 using Eigen::internal::skip;
26 using Eigen::internal::slice;
28 using Eigen::internal::id_numeric;
29 using Eigen::internal::id_type;
30 using Eigen::internal::is_same_gf;
31 using Eigen::internal::apply_op_from_left;
32 using Eigen::internal::apply_op_from_right;
33 using Eigen::internal::contained_in_list;
34 using Eigen::internal::contained_in_list_gf;
36 using Eigen::internal::arg_sum;
39 using Eigen::internal::array_reverse;
40 using Eigen::internal::array_sum;
42 using Eigen::internal::array_reduce;
43 using Eigen::internal::array_zip;
45 using Eigen::internal::array_apply;
48 using Eigen::internal::instantiate_by_c_array;
57 template<
typename A,
typename B>
struct dummy_op;
68 template<
typename A,
typename B>
struct dummy_test { constexpr
static bool value =
false; constexpr
static int global_flags = 0; };
93 VERIFY((
is_same<
typename gen_numeric_list<int, 10>::type, numeric_list<int, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9>>::
value));
99 VERIFY((
is_same<
typename gen_numeric_list<int, 10, 42>::type, numeric_list<int, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51>>::
value));
105 VERIFY((
is_same<
typename gen_numeric_list_reversed<int, 10>::type, numeric_list<int, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0>>::
value));
111 VERIFY((
is_same<
typename gen_numeric_list_reversed<int, 10, 42>::type, numeric_list<int, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42>>::
value));
117 VERIFY((
is_same<
typename gen_numeric_list_swapped_pair<int, 10, 2, 3>::type, numeric_list<int, 0, 1, 3, 2, 4, 5, 6, 7, 8, 9>>::
value));
122 VERIFY((
is_same<
typename gen_numeric_list_swapped_pair<int, 5, 44, 45, 42>::type, numeric_list<int, 42, 43, 45, 44, 46>>::
value));
123 VERIFY((
is_same<
typename gen_numeric_list_swapped_pair<int, 10, 44, 45, 42>::type, numeric_list<int, 42, 43, 45, 44, 46, 47, 48, 49, 50, 51>>::
value));
129 VERIFY((
is_same<
typename gen_numeric_list_repeated<int, 10, 0>::type, numeric_list<int, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0>>::
value));
142 VERIFY((
is_same<
typename concat<numeric_list<int, 0, 0>, numeric_list<int, 0, 0>>::
type, numeric_list<int, 0, 0, 0, 0>>::
value));
143 VERIFY((
is_same<
typename concat<numeric_list<int, 0, 0>, numeric_list<int, 1, 2>>::
type, numeric_list<int, 0, 0, 1, 2>>::
value));
153 VERIFY((
is_same<
typename mconcat<numeric_list<int, 0>, numeric_list<int, 1>>::
type, numeric_list<int, 0, 1>>::
value));
154 VERIFY((
is_same<
typename mconcat<numeric_list<int, 0>, numeric_list<int, 1>, numeric_list<int, 2>>::
type, numeric_list<int, 0, 1, 2>>::
value));
155 VERIFY((
is_same<
typename mconcat<numeric_list<int, 0>, numeric_list<int, 1, 2>>::
type, numeric_list<int, 0, 1, 2>>::
value));
156 VERIFY((
is_same<
typename mconcat<numeric_list<int, 0, 1>, numeric_list<int, 2>>::
type, numeric_list<int, 0, 1, 2>>::
value));
162 typedef numeric_list<int, 0, 1, 2, 3, 4, 5> il;
205 typedef numeric_list<int, 4, 8, 15, 16, 23, 42> il;
235 template<
typename... tt>
245 test_id_numeric<1, 4, 6>();
246 test_id_type<dummy_a, dummy_b, dummy_c>();
253 VERIFY_IS_EQUAL((!!is_same_gf<dummy_a, dummy_b>::global_flags),
false);
254 VERIFY_IS_EQUAL((!!is_same_gf<dummy_a, dummy_a>::global_flags),
false);
280 VERIFY_IS_EQUAL(((
int)contained_in_list_gf<dummy_test, dummy_a, tl>::global_flags), 1);
281 VERIFY_IS_EQUAL(((
int)contained_in_list_gf<dummy_test, dummy_b, tl>::global_flags), 2);
282 VERIFY_IS_EQUAL(((
int)contained_in_list_gf<dummy_test, dummy_c, tl>::global_flags), 4);
283 VERIFY_IS_EQUAL(((
int)contained_in_list_gf<dummy_test, dummy_d, tl>::global_flags), 0);
284 VERIFY_IS_EQUAL(((
int)contained_in_list_gf<dummy_test, dummy_e, tl>::global_flags), 0);
319 VERIFY((array_zip<product_op>(
a,
b) ==
d));
320 VERIFY((array_apply<times2_op>(
b) ==
e));
331 VERIFY((repeat<3, int>(1) == a3));
332 VERIFY((repeat<6, int>(2) == a6));
334 int data[5] = { 0, 1, 2, 3, 4 };
336 VERIFY_IS_EQUAL((instantiate_by_c_array<dummy_inst, int, 1>(data).c), 1);
337 VERIFY_IS_EQUAL((instantiate_by_c_array<dummy_inst, int, 2>(data).c), 2);
338 VERIFY_IS_EQUAL((instantiate_by_c_array<dummy_inst, int, 3>(data).c), 3);
339 VERIFY_IS_EQUAL((instantiate_by_c_array<dummy_inst, int, 4>(data).c), 4);
340 VERIFY_IS_EQUAL((instantiate_by_c_array<dummy_inst, int, 5>(data).c), 5);
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t array_prod(const Sizes< Indices... > &)
array< t, n > repeat(t v)
dummy_inst(int, int, int, int, int)
#define VERIFY_IS_APPROX(a, b)
#define VERIFY_IS_EQUAL(a, b)
bool array_apply_and_reduce(const array< A, N > &a)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
constexpr descr< 0 > concat()
bool array_zip_and_reduce(const array< A, N > &a, const array< B, N > &b)
#define CALL_SUBTEST(FUNC)
dummy_inst(int, int, int)
dummy_inst(int, int, int, int)
Container::iterator get(Container &c, Position position)