10 #ifndef EIGEN_CXX11_TENSOR_TENSOR_INDEX_LIST_H
11 #define EIGEN_CXX11_TENSOR_TENSOR_INDEX_LIST_H
47 template <Index f, Index s>
74 val = internal::convert_index<T>(new_val);
85 template <Index f, Index s>
92 static constexpr
bool value =
false;
97 static constexpr
bool value =
true;
112 template <Index f, Index s>
116 template <Index f, Index s>
120 template <Index f, Index s>
124 template <Index f, Index s>
129 template <
typename...
T>
132 template <
typename T,
typename...
O>
137 static constexpr
int count = 1 +
sizeof...(O);
144 template <
typename T>
149 constexpr
static int count = 1;
154 template <
int N,
typename...
T>
157 template <
int N,
typename T,
typename...
O>
168 template <
typename V>
174 template <
typename T,
typename...
O>
180 template <
typename V>
186 template <
int N,
typename T,
typename...
O>
190 template <
int N,
typename T,
typename...
O>
195 template <
typename T,
typename...
O>
199 template <
typename T,
typename...
O>
204 template <Index Idx,
typename ValueT>
206 template <
typename...
T>
211 template <
typename...
T>
220 template <
typename...
T>
226 template <
typename...
T>
232 template <
typename...
T>
241 template <
typename ValueT>
243 template <
typename...
T>
246 return array_get<0>(
t) ;
248 template <
typename...
T>
253 template <
typename...
T>
258 template <
typename...
T>
263 template <
typename...
T>
270 template <
typename FirstType,
typename... OtherTypes>
288 :
internal::IndexTuple<FirstType, OtherTypes...>(other) {}
290 :
internal::IndexTuple<FirstType, OtherTypes...>(first, other...) {}
299 Index>::values_up_to_known_statically(*
this);
304 Index>::values_up_to_statically_known_to_increase(*
this);
308 template <
typename FirstType,
typename... OtherTypes>
311 for (
size_t i = 0;
i < 1 +
sizeof...(OtherTypes); ++
i) {
312 if (
i > 0) os <<
", ";
319 template <
typename FirstType,
typename... OtherTypes>
321 return IndexList<FirstType, OtherTypes...>(val1, other_vals...);
324 template <
typename FirstType,
typename... OtherTypes>
336 :
internal::IndexTuple<FirstType, OtherTypes...>(other) {}
347 template <
typename FirstType,
typename... OtherTypes>
357 template <
typename FirstType,
typename... OtherTypes>
361 template <
typename FirstType,
typename... OtherTypes>
366 template <
typename FirstType,
typename... OtherTypes>
368 static const size_t value = 1 +
sizeof...(OtherTypes);
370 template <
typename FirstType,
typename... OtherTypes>
372 static const size_t value = 1 +
sizeof...(OtherTypes);
375 template <
Index N,
typename FirstType,
typename... OtherTypes>
379 template <
Index N,
typename FirstType,
typename... OtherTypes>
384 template <
typename T>
389 template <
typename FirstType,
typename... OtherTypes>
392 return IndexList<FirstType, OtherTypes...>().value_known_statically(
i);
396 template <
typename FirstType,
typename... OtherTypes>
399 return IndexList<FirstType, OtherTypes...>().value_known_statically(
i);
403 template <
typename T>
405 static constexpr
bool run() {
return false; }
408 template <
typename FirstType,
typename... OtherTypes>
411 return IndexList<FirstType, OtherTypes...>().all_values_known_statically();
415 template <
typename FirstType,
typename... OtherTypes>
418 return IndexList<FirstType, OtherTypes...>().all_values_known_statically();
422 template <
typename T>
427 template <
typename FirstType,
typename... OtherTypes>
430 return Eigen::IndexList<FirstType, OtherTypes...>().values_statically_known_to_increase();
434 template <
typename FirstType,
typename... OtherTypes>
437 return Eigen::IndexList<FirstType, OtherTypes...>().values_statically_known_to_increase();
441 template <
typename Tx>
446 template <
typename FirstType,
typename... OtherTypes>
449 return IndexList<FirstType, OtherTypes...>().value_known_statically(
i) &&
454 template <
typename FirstType,
typename... OtherTypes>
457 return IndexList<FirstType, OtherTypes...>().value_known_statically(
i) &&
462 template <
typename T>
467 template <
typename FirstType,
typename... OtherTypes>
470 return IndexList<FirstType, OtherTypes...>().value_known_statically(
i) &&
475 template <
typename FirstType,
typename... OtherTypes>
478 return IndexList<FirstType, OtherTypes...>().value_known_statically(
i) &&
483 template <
typename T>
488 template <
typename FirstType,
typename... OtherTypes>
491 return IndexList<FirstType, OtherTypes...>().value_known_statically(
i) &&
496 template <
typename FirstType,
typename... OtherTypes>
499 return IndexList<FirstType, OtherTypes...>().value_known_statically(
i) &&
504 template <
typename T>
509 template <
typename FirstType,
typename... OtherTypes>
512 return IndexList<FirstType, OtherTypes...>().value_known_statically(
i) &&
517 template <
typename FirstType,
typename... OtherTypes>
520 return IndexList<FirstType, OtherTypes...>().value_known_statically(
i) &&
525 template <
typename Tx>
530 template <
typename FirstType,
typename... OtherTypes>
533 return IndexPairList<FirstType, OtherTypes...>().value_known_statically(
i) &&
538 template <
typename FirstType,
typename... OtherTypes>
541 return IndexPairList<FirstType, OtherTypes...>().value_known_statically(
i) &&
546 template <
typename Tx>
551 template <
typename FirstType,
typename... OtherTypes>
554 return IndexPairList<FirstType, OtherTypes...>().value_known_statically(
i) &&
559 template <
typename FirstType,
typename... OtherTypes>
562 return IndexPairList<FirstType, OtherTypes...>().value_known_statically(
i) &&
572 template <
typename T>
577 template <
typename T>
582 template <
typename T>
587 template <
typename T>
592 template <
typename T>
597 template <
typename T>
602 template <
typename T>
607 template <
typename T>
612 template <
typename T>
Array< int, Dynamic, 1 > v
Definition: Array_initializer_list_vector_cxx11.cpp:1
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
MatrixXcd V
Definition: EigenSolver_EigenSolver_MatrixType.cpp:15
Eigen::Triplet< double > T
Definition: EigenUnitTest.cpp:11
#define EIGEN_UNROLL_LOOP
Definition: Macros.h:1298
#define EIGEN_CONSTEXPR
Definition: Macros.h:758
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:892
#define eigen_assert(x)
Definition: Macros.h:910
#define EIGEN_STRONG_INLINE
Definition: Macros.h:834
@ N
Definition: constructor.cpp:22
static int f(const TensorMap< Tensor< int, 3 > > &tensor)
Definition: cxx11_tensor_map.cpp:237
std::vector< Array2i > sizes
Definition: dense_solvers.cpp:12
RealScalar s
Definition: level1_cplx_impl.h:130
const Scalar * a
Definition: level2_cplx_impl.h:32
TupleImpl< sizeof...(Types), Types... > tuple
Definition: Tuple.h:267
static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool index_statically_eq(Index i, Index value)
Definition: TensorIndexList.h:588
static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool index_pair_second_statically_eq(Index i, Index value)
Definition: TensorIndexList.h:613
static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool indices_statically_known_to_increase()
Definition: TensorIndexList.h:583
constexpr EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE auto array_prod(const array< T, N > &arr) -> decltype(array_reduce< product_op, T, N >(arr, static_cast< T >(1)))
Definition: MoreMeta.h:497
static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool index_statically_ne(Index i, Index value)
Definition: TensorIndexList.h:593
static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool index_pair_first_statically_eq(Index i, Index value)
Definition: TensorIndexList.h:608
constexpr T & array_get(std::array< T, N > &a)
Definition: EmulateArray.h:251
static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool index_statically_lt(Index i, Index value)
Definition: TensorIndexList.h:603
static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool index_known_statically(Index i)
Definition: TensorIndexList.h:573
EIGEN_DEVICE_FUNC void update_value(T &val, Index new_val)
Definition: TensorIndexList.h:73
static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool index_statically_gt(Index i, Index value)
Definition: TensorIndexList.h:598
static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bool all_indices_known_statically()
Definition: TensorIndexList.h:578
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:70
squared absolute value
Definition: GlobalFunctions.h:87
std::ostream & operator<<(std::ostream &s, const DiagonalBase< Derived > &m)
Definition: IO.h:227
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
constexpr IndexList< FirstType, OtherTypes... > make_index_list(FirstType val1, OtherTypes... other_vals)
Definition: TensorIndexList.h:320
val
Definition: calibrate.py:119
Definition: Eigen_Colamd.h:49
t
Definition: plotPSD.py:36
Container::iterator get(Container &c, Position position)
Definition: stdlist_overload.cpp:29
@ RequireInitialization
Definition: NumTraits.h:177
@ ReadCost
Definition: NumTraits.h:178
@ AddCost
Definition: NumTraits.h:179
@ IsComplex
Definition: NumTraits.h:176
@ MulCost
Definition: NumTraits.h:180
Definition: TensorIndexList.h:271
constexpr EIGEN_DEVICE_FUNC IndexList(const internal::IndexTuple< FirstType, OtherTypes... > &other)
Definition: TensorIndexList.h:287
constexpr EIGEN_DEVICE_FUNC IndexList(FirstType &first, OtherTypes... other)
Definition: TensorIndexList.h:289
constexpr EIGEN_DEVICE_FUNC bool all_values_known_statically() const
Definition: TensorIndexList.h:297
EIGEN_STRONG_INLINE constexpr EIGEN_DEVICE_FUNC Index operator[](const Index i) const
Definition: TensorIndexList.h:272
EIGEN_STRONG_INLINE constexpr EIGEN_DEVICE_FUNC Index get(const Index i) const
Definition: TensorIndexList.h:276
constexpr EIGEN_DEVICE_FUNC bool values_statically_known_to_increase() const
Definition: TensorIndexList.h:302
constexpr EIGEN_DEVICE_FUNC IndexList()
Definition: TensorIndexList.h:291
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC void set(const Index i, const Index value)
Definition: TensorIndexList.h:280
constexpr EIGEN_DEVICE_FUNC bool value_known_statically(const Index i) const
Definition: TensorIndexList.h:293
EIGEN_STRONG_INLINE constexpr EIGEN_DEVICE_FUNC std::size_t size() const
Definition: TensorIndexList.h:285
Definition: TensorIndexList.h:325
EIGEN_STRONG_INLINE constexpr EIGEN_DEVICE_FUNC IndexPair< Index > operator[](const Index i) const
Definition: TensorIndexList.h:326
constexpr EIGEN_DEVICE_FUNC IndexPairList(const internal::IndexTuple< FirstType, OtherTypes... > &other)
Definition: TensorIndexList.h:335
constexpr EIGEN_DEVICE_FUNC IndexPairList()
Definition: TensorIndexList.h:337
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC void set(const Index i, const IndexPair< Index > value)
Definition: TensorIndexList.h:330
constexpr EIGEN_DEVICE_FUNC bool value_known_statically(const Index i) const
Definition: TensorIndexList.h:339
Definition: TensorMeta.h:238
static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR EIGEN_STRONG_INLINE Real highest()
Definition: TensorIndexList.h:67
static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR EIGEN_STRONG_INLINE Real epsilon()
Definition: TensorIndexList.h:65
static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR EIGEN_STRONG_INLINE Real dummy_precision()
Definition: TensorIndexList.h:66
static EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR EIGEN_STRONG_INLINE Real lowest()
Definition: TensorIndexList.h:68
Index Real
Definition: TensorIndexList.h:62
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Definition: NumTraits.h:217
Definition: TensorIndexList.h:133
IndexTuple< O... > Other
Definition: TensorIndexList.h:141
IndexTuple< O... > others
Definition: TensorIndexList.h:139
constexpr EIGEN_DEVICE_FUNC IndexTuple()
Definition: TensorIndexList.h:134
T Head
Definition: TensorIndexList.h:140
T head
Definition: TensorIndexList.h:138
constexpr EIGEN_DEVICE_FUNC IndexTuple(const T &v, const O... o)
Definition: TensorIndexList.h:135
T Head
Definition: TensorIndexList.h:151
constexpr EIGEN_DEVICE_FUNC IndexTuple()
Definition: TensorIndexList.h:146
constexpr EIGEN_DEVICE_FUNC IndexTuple(const T &v)
Definition: TensorIndexList.h:147
T head
Definition: TensorIndexList.h:150
Definition: TensorIndexList.h:130
static constexpr EIGEN_DEVICE_FUNC bool run()
Definition: TensorIndexList.h:410
static constexpr EIGEN_DEVICE_FUNC bool run()
Definition: TensorIndexList.h:417
Definition: TensorIndexList.h:404
static constexpr bool run()
Definition: TensorIndexList.h:405
static constexpr Index value
Definition: Meta.h:306
static constexpr EIGEN_DEVICE_FUNC bool run(const Index i)
Definition: TensorIndexList.h:391
static constexpr EIGEN_DEVICE_FUNC bool run(const Index i)
Definition: TensorIndexList.h:398
Definition: TensorIndexList.h:385
static constexpr EIGEN_DEVICE_FUNC bool run(const Index)
Definition: TensorIndexList.h:386
static constexpr EIGEN_DEVICE_FUNC bool run(const Index i, const Index value)
Definition: TensorIndexList.h:532
static constexpr EIGEN_DEVICE_FUNC bool run(const Index i, const Index value)
Definition: TensorIndexList.h:540
Definition: TensorIndexList.h:526
static constexpr EIGEN_DEVICE_FUNC bool run(Index, Index)
Definition: TensorIndexList.h:527
static constexpr EIGEN_DEVICE_FUNC bool run(const Index i, const Index value)
Definition: TensorIndexList.h:553
static constexpr EIGEN_DEVICE_FUNC bool run(const Index i, const Index value)
Definition: TensorIndexList.h:561
Definition: TensorIndexList.h:547
static constexpr EIGEN_DEVICE_FUNC bool run(Index, Index)
Definition: TensorIndexList.h:548
static constexpr EIGEN_DEVICE_FUNC bool run(const Index i, const Index value)
Definition: TensorIndexList.h:448
static constexpr EIGEN_DEVICE_FUNC bool run(const Index i, const Index value)
Definition: TensorIndexList.h:456
Definition: TensorIndexList.h:442
static constexpr EIGEN_DEVICE_FUNC bool run(Index, Index)
Definition: TensorIndexList.h:443
static constexpr EIGEN_DEVICE_FUNC bool run(const Index i, const Index value)
Definition: TensorIndexList.h:490
static constexpr EIGEN_DEVICE_FUNC bool run(const Index i, const Index value)
Definition: TensorIndexList.h:498
Definition: TensorIndexList.h:484
static constexpr EIGEN_DEVICE_FUNC bool run(Index, Index)
Definition: TensorIndexList.h:485
static constexpr EIGEN_DEVICE_FUNC bool run(const Index i, const Index value)
Definition: TensorIndexList.h:511
static constexpr EIGEN_DEVICE_FUNC bool run(const Index i, const Index value)
Definition: TensorIndexList.h:519
Definition: TensorIndexList.h:505
static constexpr EIGEN_DEVICE_FUNC bool run(Index, Index)
Definition: TensorIndexList.h:506
static constexpr EIGEN_DEVICE_FUNC bool run(const Index i, const Index value)
Definition: TensorIndexList.h:469
static constexpr EIGEN_DEVICE_FUNC bool run(const Index i, const Index value)
Definition: TensorIndexList.h:477
Definition: TensorIndexList.h:463
static constexpr EIGEN_DEVICE_FUNC bool run(Index, Index)
Definition: TensorIndexList.h:464
static constexpr EIGEN_DEVICE_FUNC bool run()
Definition: TensorIndexList.h:429
static constexpr EIGEN_DEVICE_FUNC bool run()
Definition: TensorIndexList.h:436
Definition: TensorIndexList.h:423
static constexpr EIGEN_DEVICE_FUNC bool run()
Definition: TensorIndexList.h:424
Definition: TensorIndexList.h:91
static constexpr bool value
Definition: TensorIndexList.h:92
static constexpr EIGEN_DEVICE_FUNC bool values_up_to_statically_known_to_increase(const IndexTuple< T... > &)
Definition: TensorIndexList.h:264
static constexpr EIGEN_DEVICE_FUNC bool values_up_to_known_statically(const IndexTuple< T... > &)
Definition: TensorIndexList.h:259
static constexpr EIGEN_DEVICE_FUNC ValueT get(const Index, const IndexTuple< T... > &t)
Definition: TensorIndexList.h:244
static constexpr EIGEN_DEVICE_FUNC bool value_known_statically(const Index i, const IndexTuple< T... > &)
Definition: TensorIndexList.h:254
static EIGEN_DEVICE_FUNC void set(const Index i, IndexTuple< T... > &t, const ValueT value)
Definition: TensorIndexList.h:249
Definition: TensorIndexList.h:205
static EIGEN_DEVICE_FUNC void set(const Index i, IndexTuple< T... > &t, const ValueT &value)
Definition: TensorIndexList.h:212
static constexpr EIGEN_DEVICE_FUNC bool values_up_to_statically_known_to_increase(const IndexTuple< T... > &t)
Definition: TensorIndexList.h:233
static constexpr EIGEN_DEVICE_FUNC bool values_up_to_known_statically(const IndexTuple< T... > &t)
Definition: TensorIndexList.h:227
static constexpr EIGEN_DEVICE_FUNC bool value_known_statically(const Index i, const IndexTuple< T... > &t)
Definition: TensorIndexList.h:221
static constexpr EIGEN_DEVICE_FUNC ValueT get(const Index i, const IndexTuple< T... > &t)
Definition: TensorIndexList.h:207
Definition: TensorIndexList.h:39
static constexpr Index value
Definition: TensorIndexList.h:40
EIGEN_DEVICE_FUNC void set(Index val)
Definition: TensorIndexList.h:42
Definition: TensorIndexList.h:48
static constexpr Index first
Definition: TensorIndexList.h:49
EIGEN_DEVICE_FUNC void set(const IndexPair< Index > &val)
Definition: TensorIndexList.h:54
static constexpr Index second
Definition: TensorIndexList.h:50