10#ifndef EIGEN_CXX11_TENSOR_TENSOR_INDEX_LIST_H
11#define EIGEN_CXX11_TENSOR_TENSOR_INDEX_LIST_H
14#if EIGEN_HAS_CONSTEXPR && EIGEN_HAS_VARIADIC_TEMPLATES
16#define EIGEN_HAS_INDEX_LIST
20template <DenseIndex n>
22 static const DenseIndex value = n;
23 EIGEN_DEVICE_FUNC
constexpr operator DenseIndex()
const {
return n; }
24 EIGEN_DEVICE_FUNC
void set(DenseIndex val) {
25 EIGEN_ONLY_USED_FOR_DEBUG(val);
26 eigen_assert(val == n);
32template <DenseIndex f, DenseIndex s>
33struct type2indexpair {
34 static const DenseIndex first = f;
35 static const DenseIndex second = s;
37 constexpr EIGEN_DEVICE_FUNC
operator IndexPair<DenseIndex>()
const {
38 return IndexPair<DenseIndex>(f, s);
41 EIGEN_DEVICE_FUNC
void set(
const IndexPair<DenseIndex>& val) {
42 EIGEN_ONLY_USED_FOR_DEBUG(val);
43 eigen_assert(val.first == f);
44 eigen_assert(val.second == s);
49template<DenseIndex n>
struct NumTraits<type2index<n> >
51 typedef DenseIndex Real;
54 RequireInitialization =
false,
60 EIGEN_DEVICE_FUNC
static inline Real epsilon() {
return 0; }
61 EIGEN_DEVICE_FUNC
static inline Real dummy_precision() {
return 0; }
62 EIGEN_DEVICE_FUNC
static inline Real highest() {
return n; }
63 EIGEN_DEVICE_FUNC
static inline Real lowest() {
return n; }
68EIGEN_DEVICE_FUNC
void update_value(T& val, DenseIndex new_val) {
71template <DenseIndex n>
72EIGEN_DEVICE_FUNC
void update_value(type2index<n>& val, DenseIndex new_val) {
77EIGEN_DEVICE_FUNC
void update_value(T& val, IndexPair<DenseIndex> new_val) {
80template <DenseIndex f, DenseIndex s>
81EIGEN_DEVICE_FUNC
void update_value(type2indexpair<f, s>& val, IndexPair<DenseIndex> new_val) {
87struct is_compile_time_constant {
88 static constexpr bool value =
false;
91template <DenseIndex
idx>
92struct is_compile_time_constant<type2index<idx> > {
93 static constexpr bool value =
true;
95template <DenseIndex
idx>
96struct is_compile_time_constant<const type2index<idx> > {
97 static constexpr bool value =
true;
99template <DenseIndex
idx>
100struct is_compile_time_constant<type2index<idx>& > {
101 static constexpr bool value =
true;
103template <DenseIndex
idx>
104struct is_compile_time_constant<const type2index<idx>& > {
105 static constexpr bool value =
true;
108template <DenseIndex f, DenseIndex s>
109struct is_compile_time_constant<type2indexpair<f, s> > {
110 static constexpr bool value =
true;
112template <DenseIndex f, DenseIndex s>
113struct is_compile_time_constant<const type2indexpair<f, s> > {
114 static constexpr bool value =
true;
116template <DenseIndex f, DenseIndex s>
117struct is_compile_time_constant<type2indexpair<f, s>& > {
118 static constexpr bool value =
true;
120template <DenseIndex f, DenseIndex s>
121struct is_compile_time_constant<const type2indexpair<f, s>& > {
122 static constexpr bool value =
true;
126template<
typename... T>
129template<
typename T,
typename... O>
130struct IndexTuple<T, O...> {
131 EIGEN_DEVICE_FUNC
constexpr IndexTuple() : head(), others() { }
132 EIGEN_DEVICE_FUNC
constexpr IndexTuple(
const T& v,
const O... o) : head(v), others(o...) { }
134 constexpr static int count = 1 +
sizeof...(O);
136 IndexTuple<O...> others;
138 typedef IndexTuple<O...> Other;
142 struct IndexTuple<T> {
143 EIGEN_DEVICE_FUNC
constexpr IndexTuple() : head() { }
144 EIGEN_DEVICE_FUNC
constexpr IndexTuple(
const T& v) : head(v) { }
146 constexpr static int count = 1;
152template<
int N,
typename... T>
153struct IndexTupleExtractor;
155template<
int N,
typename T,
typename... O>
156struct IndexTupleExtractor<N, T, O...> {
158 typedef typename IndexTupleExtractor<N-1, O...>::ValType ValType;
160 EIGEN_DEVICE_FUNC
static constexpr ValType& get_val(IndexTuple<T, O...>& val) {
161 return IndexTupleExtractor<N-1, O...>::get_val(val.others);
164 EIGEN_DEVICE_FUNC
static constexpr const ValType& get_val(
const IndexTuple<T, O...>& val) {
165 return IndexTupleExtractor<N-1, O...>::get_val(val.others);
167 template <
typename V>
168 EIGEN_DEVICE_FUNC
static void set_val(IndexTuple<T, O...>& val, V& new_val) {
169 IndexTupleExtractor<N-1, O...>::set_val(val.others, new_val);
174template<
typename T,
typename... O>
175 struct IndexTupleExtractor<0, T, O...> {
179 EIGEN_DEVICE_FUNC
static constexpr ValType& get_val(IndexTuple<T, O...>& val) {
182 EIGEN_DEVICE_FUNC
static constexpr const ValType& get_val(
const IndexTuple<T, O...>& val) {
185 template <
typename V>
186 EIGEN_DEVICE_FUNC
static void set_val(IndexTuple<T, O...>& val, V& new_val) {
193template <
int N,
typename T,
typename... O>
194EIGEN_DEVICE_FUNC
constexpr typename IndexTupleExtractor<N, T, O...>::ValType& array_get(IndexTuple<T, O...>& tuple) {
195 return IndexTupleExtractor<N, T, O...>::get_val(tuple);
197template <
int N,
typename T,
typename... O>
198EIGEN_DEVICE_FUNC
constexpr const typename IndexTupleExtractor<N, T, O...>::ValType& array_get(
const IndexTuple<T, O...>& tuple) {
199 return IndexTupleExtractor<N, T, O...>::get_val(tuple);
201template <
typename T,
typename... O>
202 struct array_size<IndexTuple<T, O...> > {
203 static const size_t value = IndexTuple<T, O...>::count;
205template <
typename T,
typename... O>
206 struct array_size<const IndexTuple<T, O...> > {
207 static const size_t value = IndexTuple<T, O...>::count;
213template <DenseIndex Idx,
typename ValueT>
215 template <
typename... T>
216 EIGEN_DEVICE_FUNC
static constexpr ValueT get(
const DenseIndex i,
const IndexTuple<T...>& t) {
218 return (i == Idx ? array_get<Idx>(t) : tuple_coeff<Idx-1, ValueT>::get(i, t));
220 template <
typename... T>
221 EIGEN_DEVICE_FUNC
static void set(
const DenseIndex i, IndexTuple<T...>& t,
const ValueT& value) {
223 update_value(array_get<Idx>(t), value);
225 tuple_coeff<Idx-1, ValueT>::set(i, t, value);
229 template <
typename... T>
230 EIGEN_DEVICE_FUNC
static constexpr bool value_known_statically(
const DenseIndex i,
const IndexTuple<T...>& t) {
231 return ((i == Idx) & is_compile_time_constant<
typename IndexTupleExtractor<Idx, T...>::ValType>::value) ||
232 tuple_coeff<Idx-1, ValueT>::value_known_statically(i, t);
235 template <
typename... T>
236 EIGEN_DEVICE_FUNC
static constexpr bool values_up_to_known_statically(
const IndexTuple<T...>& t) {
237 return is_compile_time_constant<
typename IndexTupleExtractor<Idx, T...>::ValType>::value &&
238 tuple_coeff<Idx-1, ValueT>::values_up_to_known_statically(t);
241 template <
typename... T>
242 EIGEN_DEVICE_FUNC
static constexpr bool values_up_to_statically_known_to_increase(
const IndexTuple<T...>& t) {
243 return is_compile_time_constant<
typename IndexTupleExtractor<Idx, T...>::ValType>::value &&
244 is_compile_time_constant<
typename IndexTupleExtractor<Idx, T...>::ValType>::value &&
245 array_get<Idx>(t) > array_get<Idx-1>(t) &&
246 tuple_coeff<Idx-1, ValueT>::values_up_to_statically_known_to_increase(t);
250template <
typename ValueT>
251struct tuple_coeff<0, ValueT> {
252 template <
typename... T>
253 EIGEN_DEVICE_FUNC
static constexpr ValueT get(
const DenseIndex ,
const IndexTuple<T...>& t) {
255 return array_get<0>(t);
257 template <
typename... T>
258 EIGEN_DEVICE_FUNC
static void set(
const DenseIndex i, IndexTuple<T...>& t,
const ValueT value) {
259 EIGEN_ONLY_USED_FOR_DEBUG(i);
260 eigen_assert (i == 0);
261 update_value(array_get<0>(t), value);
263 template <
typename... T>
264 EIGEN_DEVICE_FUNC
static constexpr bool value_known_statically(
const DenseIndex i,
const IndexTuple<T...>&) {
265 return is_compile_time_constant<
typename IndexTupleExtractor<0, T...>::ValType>::value & (i == 0);
268 template <
typename... T>
269 EIGEN_DEVICE_FUNC
static constexpr bool values_up_to_known_statically(
const IndexTuple<T...>&) {
270 return is_compile_time_constant<
typename IndexTupleExtractor<0, T...>::ValType>::value;
273 template <
typename... T>
274 EIGEN_DEVICE_FUNC
static constexpr bool values_up_to_statically_known_to_increase(
const IndexTuple<T...>&) {
317template <
typename FirstType,
typename... OtherTypes>
318struct IndexList : internal::IndexTuple<FirstType, OtherTypes...> {
319 EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
constexpr DenseIndex operator[] (
const DenseIndex i)
const {
320 return internal::tuple_coeff<internal::array_size<internal::IndexTuple<FirstType, OtherTypes...> >::value-1, DenseIndex>::get(i, *
this);
322 EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
constexpr DenseIndex get(
const DenseIndex i)
const {
323 return internal::tuple_coeff<internal::array_size<internal::IndexTuple<FirstType, OtherTypes...> >::value-1, DenseIndex>::get(i, *
this);
325 EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
void set(
const DenseIndex i,
const DenseIndex value) {
326 return internal::tuple_coeff<internal::array_size<internal::IndexTuple<FirstType, OtherTypes...> >::value-1, DenseIndex>::set(i, *
this, value);
329 EIGEN_DEVICE_FUNC
constexpr IndexList(
const internal::IndexTuple<FirstType, OtherTypes...>& other) : internal::IndexTuple<FirstType, OtherTypes...>(other) { }
330 EIGEN_DEVICE_FUNC
constexpr IndexList(FirstType& first, OtherTypes... other) : internal::IndexTuple<FirstType, OtherTypes...>(first, other...) { }
331 EIGEN_DEVICE_FUNC
constexpr IndexList() : internal::IndexTuple<FirstType, OtherTypes...>() { }
333 EIGEN_DEVICE_FUNC
constexpr bool value_known_statically(
const DenseIndex i)
const {
334 return internal::tuple_coeff<internal::array_size<internal::IndexTuple<FirstType, OtherTypes...> >::value-1, DenseIndex>::value_known_statically(i, *
this);
336 EIGEN_DEVICE_FUNC
constexpr bool all_values_known_statically()
const {
337 return internal::tuple_coeff<internal::array_size<internal::IndexTuple<FirstType, OtherTypes...> >::value-1, DenseIndex>::values_up_to_known_statically(*
this);
340 EIGEN_DEVICE_FUNC
constexpr bool values_statically_known_to_increase()
const {
341 return internal::tuple_coeff<internal::array_size<internal::IndexTuple<FirstType, OtherTypes...> >::value-1, DenseIndex>::values_up_to_statically_known_to_increase(*
this);
346template<
typename FirstType,
typename... OtherTypes>
347constexpr IndexList<FirstType, OtherTypes...> make_index_list(FirstType val1, OtherTypes... other_vals) {
348 return IndexList<FirstType, OtherTypes...>(val1, other_vals...);
352template<
typename FirstType,
typename... OtherTypes>
353struct IndexPairList : internal::IndexTuple<FirstType, OtherTypes...> {
354 EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
constexpr IndexPair<DenseIndex> operator[] (
const DenseIndex i)
const {
355 return internal::tuple_coeff<internal::array_size<internal::IndexTuple<FirstType, OtherTypes...> >::value-1, IndexPair<DenseIndex>>::get(i, *
this);
357 EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
void set(
const DenseIndex i,
const IndexPair<DenseIndex> value) {
358 return internal::tuple_coeff<internal::array_size<internal::IndexTuple<FirstType, OtherTypes...>>::value-1, IndexPair<DenseIndex> >::set(i, *
this, value);
361 EIGEN_DEVICE_FUNC
constexpr IndexPairList(
const internal::IndexTuple<FirstType, OtherTypes...>& other) : internal::IndexTuple<FirstType, OtherTypes...>(other) { }
362 EIGEN_DEVICE_FUNC
constexpr IndexPairList() : internal::IndexTuple<FirstType, OtherTypes...>() { }
364 EIGEN_DEVICE_FUNC
constexpr bool value_known_statically(
const DenseIndex i)
const {
365 return internal::tuple_coeff<internal::array_size<internal::IndexTuple<FirstType, OtherTypes...> >::value-1, DenseIndex>::value_known_statically(i, *
this);
371template<
typename FirstType,
typename... OtherTypes>
size_t array_prod(
const IndexList<FirstType, OtherTypes...>& sizes) {
373 for (
int i = 0; i < array_size<IndexList<FirstType, OtherTypes...> >::value; ++i) {
379template<
typename FirstType,
typename... OtherTypes>
struct array_size<IndexList<FirstType, OtherTypes...> > {
380 static const size_t value = array_size<IndexTuple<FirstType, OtherTypes...> >::value;
382template<
typename FirstType,
typename... OtherTypes>
struct array_size<const IndexList<FirstType, OtherTypes...> > {
383 static const size_t value = array_size<IndexTuple<FirstType, OtherTypes...> >::value;
386template<
typename FirstType,
typename... OtherTypes>
struct array_size<IndexPairList<FirstType, OtherTypes...> > {
387 static const size_t value = std::tuple_size<std::tuple<FirstType, OtherTypes...> >::value;
389template<
typename FirstType,
typename... OtherTypes>
struct array_size<const IndexPairList<FirstType, OtherTypes...> > {
390 static const size_t value = std::tuple_size<std::tuple<FirstType, OtherTypes...> >::value;
393template<DenseIndex N,
typename FirstType,
typename... OtherTypes> EIGEN_DEVICE_FUNC
constexpr DenseIndex array_get(IndexList<FirstType, OtherTypes...>& a) {
394 return IndexTupleExtractor<N, FirstType, OtherTypes...>::get_val(a);
396template<DenseIndex N,
typename FirstType,
typename... OtherTypes> EIGEN_DEVICE_FUNC
constexpr DenseIndex array_get(
const IndexList<FirstType, OtherTypes...>& a) {
397 return IndexTupleExtractor<N, FirstType, OtherTypes...>::get_val(a);
401struct index_known_statically_impl {
402 EIGEN_DEVICE_FUNC
static constexpr bool run(
const DenseIndex) {
407template <
typename FirstType,
typename... OtherTypes>
408struct index_known_statically_impl<IndexList<FirstType, OtherTypes...> > {
409 EIGEN_DEVICE_FUNC
static constexpr bool run(
const DenseIndex i) {
410 return IndexList<FirstType, OtherTypes...>().value_known_statically(i);
414template <
typename FirstType,
typename... OtherTypes>
415struct index_known_statically_impl<const IndexList<FirstType, OtherTypes...> > {
416 EIGEN_DEVICE_FUNC
static constexpr bool run(
const DenseIndex i) {
417 return IndexList<FirstType, OtherTypes...>().value_known_statically(i);
423struct all_indices_known_statically_impl {
424 static constexpr bool run() {
429template <
typename FirstType,
typename... OtherTypes>
430struct all_indices_known_statically_impl<IndexList<FirstType, OtherTypes...> > {
431 EIGEN_DEVICE_FUNC
static constexpr bool run() {
432 return IndexList<FirstType, OtherTypes...>().all_values_known_statically();
436template <
typename FirstType,
typename... OtherTypes>
437struct all_indices_known_statically_impl<const IndexList<FirstType, OtherTypes...> > {
438 EIGEN_DEVICE_FUNC
static constexpr bool run() {
439 return IndexList<FirstType, OtherTypes...>().all_values_known_statically();
445struct indices_statically_known_to_increase_impl {
446 EIGEN_DEVICE_FUNC
static constexpr bool run() {
451template <
typename FirstType,
typename... OtherTypes>
452 struct indices_statically_known_to_increase_impl<IndexList<FirstType, OtherTypes...> > {
453 EIGEN_DEVICE_FUNC
static constexpr bool run() {
454 return Eigen::IndexList<FirstType, OtherTypes...>().values_statically_known_to_increase();
458template <
typename FirstType,
typename... OtherTypes>
459 struct indices_statically_known_to_increase_impl<const IndexList<FirstType, OtherTypes...> > {
460 EIGEN_DEVICE_FUNC
static constexpr bool run() {
461 return Eigen::IndexList<FirstType, OtherTypes...>().values_statically_known_to_increase();
466template <
typename Tx>
467struct index_statically_eq_impl {
468 EIGEN_DEVICE_FUNC
static constexpr bool run(DenseIndex, DenseIndex) {
473template <
typename FirstType,
typename... OtherTypes>
474struct index_statically_eq_impl<IndexList<FirstType, OtherTypes...> > {
475 EIGEN_DEVICE_FUNC
static constexpr bool run(
const DenseIndex i,
const DenseIndex value) {
476 return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
477 (IndexList<FirstType, OtherTypes...>().get(i) == value);
481template <
typename FirstType,
typename... OtherTypes>
482struct index_statically_eq_impl<const IndexList<FirstType, OtherTypes...> > {
483 EIGEN_DEVICE_FUNC
static constexpr bool run(
const DenseIndex i,
const DenseIndex value) {
484 return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
485 (IndexList<FirstType, OtherTypes...>().get(i) == value);
491struct index_statically_ne_impl {
492 EIGEN_DEVICE_FUNC
static constexpr bool run(DenseIndex, DenseIndex) {
497template <
typename FirstType,
typename... OtherTypes>
498struct index_statically_ne_impl<IndexList<FirstType, OtherTypes...> > {
499 EIGEN_DEVICE_FUNC
static constexpr bool run(
const DenseIndex i,
const DenseIndex value) {
500 return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
501 (IndexList<FirstType, OtherTypes...>().get(i) != value);
505template <
typename FirstType,
typename... OtherTypes>
506struct index_statically_ne_impl<const IndexList<FirstType, OtherTypes...> > {
507 EIGEN_DEVICE_FUNC
static constexpr bool run(
const DenseIndex i,
const DenseIndex value) {
508 return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
509 (IndexList<FirstType, OtherTypes...>().get(i) != value);
515struct index_statically_gt_impl {
516 EIGEN_DEVICE_FUNC
static constexpr bool run(DenseIndex, DenseIndex) {
521template <
typename FirstType,
typename... OtherTypes>
522struct index_statically_gt_impl<IndexList<FirstType, OtherTypes...> > {
523 EIGEN_DEVICE_FUNC
static constexpr bool run(
const DenseIndex i,
const DenseIndex value) {
524 return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
525 (IndexList<FirstType, OtherTypes...>().get(i) > value);
529template <
typename FirstType,
typename... OtherTypes>
530struct index_statically_gt_impl<const IndexList<FirstType, OtherTypes...> > {
531 EIGEN_DEVICE_FUNC
static constexpr bool run(
const DenseIndex i,
const DenseIndex value) {
532 return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
533 (IndexList<FirstType, OtherTypes...>().get(i) > value);
540struct index_statically_lt_impl {
541 EIGEN_DEVICE_FUNC
static constexpr bool run(DenseIndex, DenseIndex) {
546template <
typename FirstType,
typename... OtherTypes>
547struct index_statically_lt_impl<IndexList<FirstType, OtherTypes...> > {
548 EIGEN_DEVICE_FUNC
static constexpr bool run(
const DenseIndex i,
const DenseIndex value) {
549 return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
550 (IndexList<FirstType, OtherTypes...>().get(i) < value);
554template <
typename FirstType,
typename... OtherTypes>
555struct index_statically_lt_impl<const IndexList<FirstType, OtherTypes...> > {
556 EIGEN_DEVICE_FUNC
static constexpr bool run(
const DenseIndex i,
const DenseIndex value) {
557 return IndexList<FirstType, OtherTypes...>().value_known_statically(i) &
558 (IndexList<FirstType, OtherTypes...>().get(i) < value);
564template <
typename Tx>
565struct index_pair_first_statically_eq_impl {
566 EIGEN_DEVICE_FUNC
static constexpr bool run(DenseIndex, DenseIndex) {
571template <
typename FirstType,
typename... OtherTypes>
572struct index_pair_first_statically_eq_impl<IndexPairList<FirstType, OtherTypes...> > {
573 EIGEN_DEVICE_FUNC
static constexpr bool run(
const DenseIndex i,
const DenseIndex value) {
574 return IndexPairList<FirstType, OtherTypes...>().value_known_statically(i) &
575 (IndexPairList<FirstType, OtherTypes...>().operator[](i).first == value);
579template <
typename FirstType,
typename... OtherTypes>
580struct index_pair_first_statically_eq_impl<const IndexPairList<FirstType, OtherTypes...> > {
581 EIGEN_DEVICE_FUNC
static constexpr bool run(
const DenseIndex i,
const DenseIndex value) {
582 return IndexPairList<FirstType, OtherTypes...>().value_known_statically(i) &
583 (IndexPairList<FirstType, OtherTypes...>().operator[](i).first == value);
589template <
typename Tx>
590struct index_pair_second_statically_eq_impl {
591 EIGEN_DEVICE_FUNC
static constexpr bool run(DenseIndex, DenseIndex) {
596template <
typename FirstType,
typename... OtherTypes>
597struct index_pair_second_statically_eq_impl<IndexPairList<FirstType, OtherTypes...> > {
598 EIGEN_DEVICE_FUNC
static constexpr bool run(
const DenseIndex i,
const DenseIndex value) {
599 return IndexPairList<FirstType, OtherTypes...>().value_known_statically(i) &
600 (IndexPairList<FirstType, OtherTypes...>().operator[](i).second == value);
604template <
typename FirstType,
typename... OtherTypes>
605struct index_pair_second_statically_eq_impl<const IndexPairList<FirstType, OtherTypes...> > {
606 EIGEN_DEVICE_FUNC
static constexpr bool run(
const DenseIndex i,
const DenseIndex value) {
607 return IndexPairList<FirstType, OtherTypes...>().value_known_statically(i) &
608 (IndexPairList<FirstType, OtherTypes...>().operator[](i).second == value);
622struct index_known_statically_impl {
623 static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
bool run(
const DenseIndex) {
629struct all_indices_known_statically_impl {
630 static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
bool run() {
636struct indices_statically_known_to_increase_impl {
637 static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
bool run() {
643struct index_statically_eq_impl {
644 static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
bool run(DenseIndex, DenseIndex) {
650struct index_statically_ne_impl {
651 static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
bool run(DenseIndex, DenseIndex) {
657struct index_statically_gt_impl {
658 static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
bool run(DenseIndex, DenseIndex) {
664struct index_statically_lt_impl {
665 static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
bool run(DenseIndex, DenseIndex) {
670template <
typename Tx>
671struct index_pair_first_statically_eq_impl {
672 static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
bool run(DenseIndex, DenseIndex) {
677template <
typename Tx>
678struct index_pair_second_statically_eq_impl {
679 static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
bool run(DenseIndex, DenseIndex) {
695static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
bool index_known_statically(DenseIndex i) {
696 return index_known_statically_impl<T>::run(i);
700static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
bool all_indices_known_statically() {
701 return all_indices_known_statically_impl<T>::run();
705static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
bool indices_statically_known_to_increase() {
706 return indices_statically_known_to_increase_impl<T>::run();
710static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
bool index_statically_eq(DenseIndex i, DenseIndex value) {
711 return index_statically_eq_impl<T>::run(i, value);
715static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
bool index_statically_ne(DenseIndex i, DenseIndex value) {
716 return index_statically_ne_impl<T>::run(i, value);
720static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
bool index_statically_gt(DenseIndex i, DenseIndex value) {
721 return index_statically_gt_impl<T>::run(i, value);
725static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
bool index_statically_lt(DenseIndex i, DenseIndex value) {
726 return index_statically_lt_impl<T>::run(i, value);
730static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
bool index_pair_first_statically_eq(DenseIndex i, DenseIndex value) {
731 return index_pair_first_statically_eq_impl<T>::run(i, value);
735static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
bool index_pair_second_statically_eq(DenseIndex i, DenseIndex value) {
736 return index_pair_second_statically_eq_impl<T>::run(i, value);
Namespace containing all symbols from the Eigen library.