10 #ifndef EIGEN_CXX11_TENSOR_TENSOR_INDEX_LIST_H 11 #define EIGEN_CXX11_TENSOR_TENSOR_INDEX_LIST_H 14 #include "./InternalHeaderCheck.h" 20 static constexpr
Index value = n;
21 EIGEN_DEVICE_FUNC constexpr
operator Index()
const {
return n; }
22 EIGEN_DEVICE_FUNC
void set(
Index val) { eigen_assert(val == n); }
27 template <Index f, Index s>
28 struct type2indexpair {
29 static constexpr
Index first = f;
30 static constexpr
Index second = s;
32 constexpr EIGEN_DEVICE_FUNC
operator IndexPair<Index>()
const {
return IndexPair<Index>(f, s); }
34 EIGEN_DEVICE_FUNC
void set(
const IndexPair<Index>& val) {
35 eigen_assert(val.first == f);
36 eigen_assert(val.second == s);
41 struct NumTraits<type2index<n>> {
43 enum { IsComplex = 0, RequireInitialization =
false, ReadCost = 1, AddCost = 1, MulCost = 1 };
45 EIGEN_DEVICE_FUNC
static constexpr EIGEN_STRONG_INLINE Real epsilon() {
return 0; }
46 EIGEN_DEVICE_FUNC
static constexpr EIGEN_STRONG_INLINE Real dummy_precision() {
return 0; }
47 EIGEN_DEVICE_FUNC
static constexpr EIGEN_STRONG_INLINE Real highest() {
return n; }
48 EIGEN_DEVICE_FUNC
static constexpr EIGEN_STRONG_INLINE Real lowest() {
return n; }
53 EIGEN_DEVICE_FUNC
void update_value(T& val,
Index new_val) {
54 val = internal::convert_index<T>(new_val);
57 EIGEN_DEVICE_FUNC
void update_value(type2index<n>& val,
Index new_val) {
62 EIGEN_DEVICE_FUNC
void update_value(T& val, IndexPair<Index> new_val) {
65 template <Index f, Index s>
66 EIGEN_DEVICE_FUNC
void update_value(type2indexpair<f, s>& val, IndexPair<Index> new_val) {
71 struct is_compile_time_constant {
72 static constexpr
bool value =
false;
76 struct is_compile_time_constant<type2index<idx>> {
77 static constexpr
bool value =
true;
80 struct is_compile_time_constant<const type2index<idx>> {
81 static constexpr
bool value =
true;
84 struct is_compile_time_constant<type2index<idx>&> {
85 static constexpr
bool value =
true;
88 struct is_compile_time_constant<const type2index<idx>&> {
89 static constexpr
bool value =
true;
92 template <Index f, Index s>
93 struct is_compile_time_constant<type2indexpair<f, s>> {
94 static constexpr
bool value =
true;
96 template <Index f, Index s>
97 struct is_compile_time_constant<const type2indexpair<f, s>> {
98 static constexpr
bool value =
true;
100 template <Index f, Index s>
101 struct is_compile_time_constant<type2indexpair<f, s>&> {
102 static constexpr
bool value =
true;
104 template <Index f, Index s>
105 struct is_compile_time_constant<const type2indexpair<f, s>&> {
106 static constexpr
bool value =
true;
109 template <
typename... T>
112 template <
typename T,
typename... O>
113 struct IndexTuple<T, O...> {
114 EIGEN_DEVICE_FUNC constexpr IndexTuple() : head(), others() {}
115 EIGEN_DEVICE_FUNC constexpr IndexTuple(
const T& v,
const O... o) : head(v), others(o...) {}
117 static constexpr
int count = 1 +
sizeof...(O);
119 IndexTuple<O...> others;
121 typedef IndexTuple<O...> Other;
124 template <
typename T>
125 struct IndexTuple<T> {
126 EIGEN_DEVICE_FUNC constexpr IndexTuple() : head() {}
127 EIGEN_DEVICE_FUNC constexpr IndexTuple(
const T& v) : head(v) {}
129 constexpr
static int count = 1;
134 template <
int N,
typename... T>
135 struct IndexTupleExtractor;
137 template <
int N,
typename T,
typename... O>
138 struct IndexTupleExtractor<N, T, O...> {
139 typedef typename IndexTupleExtractor<N - 1, O...>::ValType ValType;
141 EIGEN_DEVICE_FUNC
static constexpr ValType& get_val(IndexTuple<T, O...>& val) {
142 return IndexTupleExtractor<N - 1, O...>::get_val(val.others);
145 EIGEN_DEVICE_FUNC
static constexpr
const ValType& get_val(
const IndexTuple<T, O...>& val) {
146 return IndexTupleExtractor<N - 1, O...>::get_val(val.others);
148 template <
typename V>
149 EIGEN_DEVICE_FUNC
static void set_val(IndexTuple<T, O...>& val, V& new_val) {
150 IndexTupleExtractor<N - 1, O...>::set_val(val.others, new_val);
154 template <
typename T,
typename... O>
155 struct IndexTupleExtractor<0, T, O...> {
158 EIGEN_DEVICE_FUNC
static constexpr ValType& get_val(IndexTuple<T, O...>& val) {
return val.head; }
159 EIGEN_DEVICE_FUNC
static constexpr
const ValType& get_val(
const IndexTuple<T, O...>& val) {
return val.head; }
160 template <
typename V>
161 EIGEN_DEVICE_FUNC
static void set_val(IndexTuple<T, O...>& val, V& new_val) {
166 template <
int N,
typename T,
typename... O>
167 EIGEN_DEVICE_FUNC constexpr
typename IndexTupleExtractor<N, T, O...>::ValType& array_get(IndexTuple<T, O...>& tuple) {
168 return IndexTupleExtractor<N, T, O...>::get_val(tuple);
170 template <
int N,
typename T,
typename... O>
171 EIGEN_DEVICE_FUNC constexpr
const typename IndexTupleExtractor<N, T, O...>::ValType& array_get(
172 const IndexTuple<T, O...>& tuple) {
173 return IndexTupleExtractor<N, T, O...>::get_val(tuple);
175 template <
typename T,
typename... O>
176 struct array_size<IndexTuple<T, O...>> {
177 static constexpr
size_t value = IndexTuple<T, O...>::count;
179 template <
typename T,
typename... O>
180 struct array_size<const IndexTuple<T, O...>> {
181 static constexpr
size_t value = IndexTuple<T, O...>::count;
184 template <Index Idx,
typename ValueT>
186 template <
typename... T>
187 EIGEN_DEVICE_FUNC
static constexpr ValueT
get(
const Index i,
const IndexTuple<T...>& t) {
189 return (i == Idx ? array_get<Idx>(t) : tuple_coeff<Idx - 1, ValueT>::get(i, t));
191 template <
typename... T>
192 EIGEN_DEVICE_FUNC
static void set(
const Index i, IndexTuple<T...>& t,
const ValueT& value) {
194 update_value(array_get<Idx>(t), value);
196 tuple_coeff<Idx - 1, ValueT>::set(i, t, value);
200 template <
typename... T>
201 EIGEN_DEVICE_FUNC
static constexpr
bool value_known_statically(
const Index i,
const IndexTuple<T...>& t) {
202 return ((i == Idx) && is_compile_time_constant<
typename IndexTupleExtractor<Idx, T...>::ValType>::value) ||
203 tuple_coeff<Idx - 1, ValueT>::value_known_statically(i, t);
206 template <
typename... T>
207 EIGEN_DEVICE_FUNC
static constexpr
bool values_up_to_known_statically(
const IndexTuple<T...>& t) {
208 return is_compile_time_constant<
typename IndexTupleExtractor<Idx, T...>::ValType>::value &&
209 tuple_coeff<Idx - 1, ValueT>::values_up_to_known_statically(t);
212 template <
typename... T>
213 EIGEN_DEVICE_FUNC
static constexpr
bool values_up_to_statically_known_to_increase(
const IndexTuple<T...>& t) {
214 return is_compile_time_constant<
typename IndexTupleExtractor<Idx, T...>::ValType>::value &&
215 is_compile_time_constant<
typename IndexTupleExtractor<Idx, T...>::ValType>::value &&
216 array_get<Idx>(t) > array_get<Idx - 1>(t) &&
217 tuple_coeff<Idx - 1, ValueT>::values_up_to_statically_known_to_increase(t);
221 template <
typename ValueT>
222 struct tuple_coeff<0, ValueT> {
223 template <
typename... T>
224 EIGEN_DEVICE_FUNC
static constexpr ValueT
get(
const Index ,
const IndexTuple<T...>& t) {
226 return array_get<0>(t) ;
228 template <
typename... T>
229 EIGEN_DEVICE_FUNC
static void set(
const Index i, IndexTuple<T...>& t,
const ValueT value) {
230 eigen_assert(i == 0);
231 update_value(array_get<0>(t), value);
233 template <
typename... T>
234 EIGEN_DEVICE_FUNC
static constexpr
bool value_known_statically(
const Index i,
const IndexTuple<T...>&) {
235 return is_compile_time_constant<
typename IndexTupleExtractor<0, T...>::ValType>::value && (i == 0);
238 template <
typename... T>
239 EIGEN_DEVICE_FUNC
static constexpr
bool values_up_to_known_statically(
const IndexTuple<T...>&) {
240 return is_compile_time_constant<
typename IndexTupleExtractor<0, T...>::ValType>::value;
243 template <
typename... T>
244 EIGEN_DEVICE_FUNC
static constexpr
bool values_up_to_statically_known_to_increase(
const IndexTuple<T...>&) {
269 template <
typename FirstType,
typename... OtherTypes>
270 struct IndexList : internal::IndexTuple<FirstType, OtherTypes...> {
271 EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC constexpr
Index operator[](
const Index i)
const {
272 return internal::tuple_coeff<internal::array_size<internal::IndexTuple<FirstType, OtherTypes...>>::value - 1,
273 Index>::get(i, *
this);
275 EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC constexpr
Index get(
const Index i)
const {
276 return internal::tuple_coeff<internal::array_size<internal::IndexTuple<FirstType, OtherTypes...>>::value - 1,
277 Index>::get(i, *
this);
279 EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
void set(
const Index i,
const Index value) {
280 return internal::tuple_coeff<internal::array_size<internal::IndexTuple<FirstType, OtherTypes...>>::value - 1,
281 Index>::set(i, *
this, value);
284 EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC constexpr std::size_t size()
const {
return 1 +
sizeof...(OtherTypes); };
286 EIGEN_DEVICE_FUNC constexpr IndexList(
const internal::IndexTuple<FirstType, OtherTypes...>& other)
287 : internal::IndexTuple<FirstType, OtherTypes...>(other) {}
288 EIGEN_DEVICE_FUNC constexpr IndexList(FirstType& first, OtherTypes... other)
289 : internal::IndexTuple<FirstType, OtherTypes...>(first, other...) {}
290 EIGEN_DEVICE_FUNC constexpr IndexList() : internal::IndexTuple<FirstType, OtherTypes...>() {}
292 EIGEN_DEVICE_FUNC constexpr
bool value_known_statically(
const Index i)
const {
293 return internal::tuple_coeff<internal::array_size<internal::IndexTuple<FirstType, OtherTypes...>>::value - 1,
294 Index>::value_known_statically(i, *
this);
296 EIGEN_DEVICE_FUNC constexpr
bool all_values_known_statically()
const {
297 return internal::tuple_coeff<internal::array_size<internal::IndexTuple<FirstType, OtherTypes...>>::value - 1,
298 Index>::values_up_to_known_statically(*
this);
301 EIGEN_DEVICE_FUNC constexpr
bool values_statically_known_to_increase()
const {
302 return internal::tuple_coeff<internal::array_size<internal::IndexTuple<FirstType, OtherTypes...>>::value - 1,
303 Index>::values_up_to_statically_known_to_increase(*
this);
307 template <
typename FirstType,
typename... OtherTypes>
308 std::ostream& operator<<(std::ostream& os,
const IndexList<FirstType, OtherTypes...>& dims) {
310 for (
size_t i = 0; i < 1 +
sizeof...(OtherTypes); ++i) {
311 if (i > 0) os <<
", ";
318 template <
typename FirstType,
typename... OtherTypes>
319 constexpr IndexList<FirstType, OtherTypes...> make_index_list(FirstType val1, OtherTypes... other_vals) {
320 return IndexList<FirstType, OtherTypes...>(val1, other_vals...);
323 template <
typename FirstType,
typename... OtherTypes>
324 struct IndexPairList : internal::IndexTuple<FirstType, OtherTypes...> {
325 EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC constexpr IndexPair<Index> operator[](
const Index i)
const {
326 return internal::tuple_coeff<internal::array_size<internal::IndexTuple<FirstType, OtherTypes...>>::value - 1,
327 IndexPair<Index>>::get(i, *
this);
329 EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
void set(
const Index i,
const IndexPair<Index> value) {
330 return internal::tuple_coeff<internal::array_size<internal::IndexTuple<FirstType, OtherTypes...>>::value - 1,
331 IndexPair<Index>>::set(i, *
this, value);
334 EIGEN_DEVICE_FUNC constexpr IndexPairList(
const internal::IndexTuple<FirstType, OtherTypes...>& other)
335 : internal::IndexTuple<FirstType, OtherTypes...>(other) {}
336 EIGEN_DEVICE_FUNC constexpr IndexPairList() : internal::IndexTuple<FirstType, OtherTypes...>() {}
338 EIGEN_DEVICE_FUNC constexpr
bool value_known_statically(
const Index i)
const {
339 return internal::tuple_coeff<internal::array_size<internal::IndexTuple<FirstType, OtherTypes...>>::value - 1,
340 Index>::value_known_statically(i, *
this);
346 template <
typename FirstType,
typename... OtherTypes>
347 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
Index array_prod(
const IndexList<FirstType, OtherTypes...>& sizes) {
350 for (
size_t i = 0; i < array_size<IndexList<FirstType, OtherTypes...>>::value; ++i) {
356 template <
typename FirstType,
typename... OtherTypes>
357 struct array_size<IndexList<FirstType, OtherTypes...>> {
358 static const size_t value = array_size<IndexTuple<FirstType, OtherTypes...>>::value;
360 template <
typename FirstType,
typename... OtherTypes>
361 struct array_size<const IndexList<FirstType, OtherTypes...>> {
362 static const size_t value = array_size<IndexTuple<FirstType, OtherTypes...>>::value;
365 template <
typename FirstType,
typename... OtherTypes>
366 struct array_size<IndexPairList<FirstType, OtherTypes...>> {
367 static const size_t value = 1 +
sizeof...(OtherTypes);
369 template <
typename FirstType,
typename... OtherTypes>
370 struct array_size<const IndexPairList<FirstType, OtherTypes...>> {
371 static const size_t value = 1 +
sizeof...(OtherTypes);
374 template <
Index N,
typename FirstType,
typename... OtherTypes>
375 EIGEN_DEVICE_FUNC constexpr
Index array_get(IndexList<FirstType, OtherTypes...>& a) {
376 return IndexTupleExtractor<N, FirstType, OtherTypes...>::get_val(a);
378 template <
Index N,
typename FirstType,
typename... OtherTypes>
379 EIGEN_DEVICE_FUNC constexpr
Index array_get(
const IndexList<FirstType, OtherTypes...>& a) {
380 return IndexTupleExtractor<N, FirstType, OtherTypes...>::get_val(a);
383 template <
typename T>
384 struct index_known_statically_impl {
385 EIGEN_DEVICE_FUNC
static constexpr
bool run(
const Index) {
return false; }
388 template <
typename FirstType,
typename... OtherTypes>
389 struct index_known_statically_impl<IndexList<FirstType, OtherTypes...>> {
390 EIGEN_DEVICE_FUNC
static constexpr
bool run(
const Index i) {
391 return IndexList<FirstType, OtherTypes...>().value_known_statically(i);
395 template <
typename FirstType,
typename... OtherTypes>
396 struct index_known_statically_impl<const IndexList<FirstType, OtherTypes...>> {
397 EIGEN_DEVICE_FUNC
static constexpr
bool run(
const Index i) {
398 return IndexList<FirstType, OtherTypes...>().value_known_statically(i);
402 template <
typename T>
403 struct all_indices_known_statically_impl {
404 static constexpr
bool run() {
return false; }
407 template <
typename FirstType,
typename... OtherTypes>
408 struct all_indices_known_statically_impl<IndexList<FirstType, OtherTypes...>> {
409 EIGEN_DEVICE_FUNC
static constexpr
bool run() {
410 return IndexList<FirstType, OtherTypes...>().all_values_known_statically();
414 template <
typename FirstType,
typename... OtherTypes>
415 struct all_indices_known_statically_impl<const IndexList<FirstType, OtherTypes...>> {
416 EIGEN_DEVICE_FUNC
static constexpr
bool run() {
417 return IndexList<FirstType, OtherTypes...>().all_values_known_statically();
421 template <
typename T>
422 struct indices_statically_known_to_increase_impl {
423 EIGEN_DEVICE_FUNC
static constexpr
bool run() {
return false; }
426 template <
typename FirstType,
typename... OtherTypes>
427 struct indices_statically_known_to_increase_impl<IndexList<FirstType, OtherTypes...>> {
428 EIGEN_DEVICE_FUNC
static constexpr
bool run() {
429 return Eigen::IndexList<FirstType, OtherTypes...>().values_statically_known_to_increase();
433 template <
typename FirstType,
typename... OtherTypes>
434 struct indices_statically_known_to_increase_impl<const IndexList<FirstType, OtherTypes...>> {
435 EIGEN_DEVICE_FUNC
static constexpr
bool run() {
436 return Eigen::IndexList<FirstType, OtherTypes...>().values_statically_known_to_increase();
440 template <
typename Tx>
441 struct index_statically_eq_impl {
442 EIGEN_DEVICE_FUNC
static constexpr
bool run(
Index,
Index) {
return false; }
445 template <
typename FirstType,
typename... OtherTypes>
446 struct index_statically_eq_impl<IndexList<FirstType, OtherTypes...>> {
447 EIGEN_DEVICE_FUNC
static constexpr
bool run(
const Index i,
const Index value) {
448 return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &&
449 (IndexList<FirstType, OtherTypes...>().
get(i) == value);
453 template <
typename FirstType,
typename... OtherTypes>
454 struct index_statically_eq_impl<const IndexList<FirstType, OtherTypes...>> {
455 EIGEN_DEVICE_FUNC
static constexpr
bool run(
const Index i,
const Index value) {
456 return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &&
457 (IndexList<FirstType, OtherTypes...>().
get(i) == value);
461 template <
typename T>
462 struct index_statically_ne_impl {
463 EIGEN_DEVICE_FUNC
static constexpr
bool run(
Index,
Index) {
return false; }
466 template <
typename FirstType,
typename... OtherTypes>
467 struct index_statically_ne_impl<IndexList<FirstType, OtherTypes...>> {
468 EIGEN_DEVICE_FUNC
static constexpr
bool run(
const Index i,
const Index value) {
469 return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &&
470 (IndexList<FirstType, OtherTypes...>().
get(i) != value);
474 template <
typename FirstType,
typename... OtherTypes>
475 struct index_statically_ne_impl<const IndexList<FirstType, OtherTypes...>> {
476 EIGEN_DEVICE_FUNC
static constexpr
bool run(
const Index i,
const Index value) {
477 return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &&
478 (IndexList<FirstType, OtherTypes...>().
get(i) != value);
482 template <
typename T>
483 struct index_statically_gt_impl {
484 EIGEN_DEVICE_FUNC
static constexpr
bool run(
Index,
Index) {
return false; }
487 template <
typename FirstType,
typename... OtherTypes>
488 struct index_statically_gt_impl<IndexList<FirstType, OtherTypes...>> {
489 EIGEN_DEVICE_FUNC
static constexpr
bool run(
const Index i,
const Index value) {
490 return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &&
491 (IndexList<FirstType, OtherTypes...>().
get(i) > value);
495 template <
typename FirstType,
typename... OtherTypes>
496 struct index_statically_gt_impl<const IndexList<FirstType, OtherTypes...>> {
497 EIGEN_DEVICE_FUNC
static constexpr
bool run(
const Index i,
const Index value) {
498 return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &&
499 (IndexList<FirstType, OtherTypes...>().
get(i) > value);
503 template <
typename T>
504 struct index_statically_lt_impl {
505 EIGEN_DEVICE_FUNC
static constexpr
bool run(
Index,
Index) {
return false; }
508 template <
typename FirstType,
typename... OtherTypes>
509 struct index_statically_lt_impl<IndexList<FirstType, OtherTypes...>> {
510 EIGEN_DEVICE_FUNC
static constexpr
bool run(
const Index i,
const Index value) {
511 return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &&
512 (IndexList<FirstType, OtherTypes...>().
get(i) < value);
516 template <
typename FirstType,
typename... OtherTypes>
517 struct index_statically_lt_impl<const IndexList<FirstType, OtherTypes...>> {
518 EIGEN_DEVICE_FUNC
static constexpr
bool run(
const Index i,
const Index value) {
519 return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &&
520 (IndexList<FirstType, OtherTypes...>().
get(i) < value);
524 template <
typename Tx>
525 struct index_pair_first_statically_eq_impl {
526 EIGEN_DEVICE_FUNC
static constexpr
bool run(
Index,
Index) {
return false; }
529 template <
typename FirstType,
typename... OtherTypes>
530 struct index_pair_first_statically_eq_impl<IndexPairList<FirstType, OtherTypes...>> {
531 EIGEN_DEVICE_FUNC
static constexpr
bool run(
const Index i,
const Index value) {
532 return IndexPairList<FirstType, OtherTypes...>().value_known_statically(i) &&
533 (IndexPairList<FirstType, OtherTypes...>().
operator[](i).first == value);
537 template <
typename FirstType,
typename... OtherTypes>
538 struct index_pair_first_statically_eq_impl<const IndexPairList<FirstType, OtherTypes...>> {
539 EIGEN_DEVICE_FUNC
static constexpr
bool run(
const Index i,
const Index value) {
540 return IndexPairList<FirstType, OtherTypes...>().value_known_statically(i) &&
541 (IndexPairList<FirstType, OtherTypes...>().
operator[](i).first == value);
545 template <
typename Tx>
546 struct index_pair_second_statically_eq_impl {
547 EIGEN_DEVICE_FUNC
static constexpr
bool run(
Index,
Index) {
return false; }
550 template <
typename FirstType,
typename... OtherTypes>
551 struct index_pair_second_statically_eq_impl<IndexPairList<FirstType, OtherTypes...>> {
552 EIGEN_DEVICE_FUNC
static constexpr
bool run(
const Index i,
const Index value) {
553 return IndexPairList<FirstType, OtherTypes...>().value_known_statically(i) &&
554 (IndexPairList<FirstType, OtherTypes...>().
operator[](i).second == value);
558 template <
typename FirstType,
typename... OtherTypes>
559 struct index_pair_second_statically_eq_impl<const IndexPairList<FirstType, OtherTypes...>> {
560 EIGEN_DEVICE_FUNC
static constexpr
bool run(
const Index i,
const Index value) {
561 return IndexPairList<FirstType, OtherTypes...>().value_known_statically(i) &&
562 (IndexPairList<FirstType, OtherTypes...>().
operator[](i).second == value);
571 template <
typename T>
572 static EIGEN_DEVICE_FUNC constexpr
bool index_known_statically(
Index i) {
573 return index_known_statically_impl<T>::run(i);
576 template <
typename T>
577 static EIGEN_DEVICE_FUNC constexpr
bool all_indices_known_statically() {
578 return all_indices_known_statically_impl<T>::run();
581 template <
typename T>
582 static EIGEN_DEVICE_FUNC constexpr
bool indices_statically_known_to_increase() {
583 return indices_statically_known_to_increase_impl<T>::run();
586 template <
typename T>
587 static EIGEN_DEVICE_FUNC constexpr
bool index_statically_eq(
Index i,
Index value) {
588 return index_statically_eq_impl<T>::run(i, value);
591 template <
typename T>
592 static EIGEN_DEVICE_FUNC constexpr
bool index_statically_ne(
Index i,
Index value) {
593 return index_statically_ne_impl<T>::run(i, value);
596 template <
typename T>
597 static EIGEN_DEVICE_FUNC constexpr
bool index_statically_gt(
Index i,
Index value) {
598 return index_statically_gt_impl<T>::run(i, value);
601 template <
typename T>
602 static EIGEN_DEVICE_FUNC constexpr
bool index_statically_lt(
Index i,
Index value) {
603 return index_statically_lt_impl<T>::run(i, value);
606 template <
typename T>
607 static EIGEN_DEVICE_FUNC constexpr
bool index_pair_first_statically_eq(
Index i,
Index value) {
608 return index_pair_first_statically_eq_impl<T>::run(i, value);
611 template <
typename T>
612 static EIGEN_DEVICE_FUNC constexpr
bool index_pair_second_statically_eq(
Index i,
Index value) {
613 return index_pair_second_statically_eq_impl<T>::run(i, value);
619 #endif // EIGEN_CXX11_TENSOR_TENSOR_INDEX_LIST_H Namespace containing all symbols from the Eigen library.
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index