10 #ifndef EIGEN_CXX11_TENSOR_TENSOR_DIMENSION_LIST_H 11 #define EIGEN_CXX11_TENSOR_TENSOR_DIMENSION_LIST_H 14 #include "./InternalHeaderCheck.h" 26 template <
typename Index, std::
size_t Rank>
27 struct DimensionList {
28 EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
const Index operator[](
const Index i)
const {
return i; }
33 template <
typename Index, std::
size_t Rank>
34 struct array_size<DimensionList<
Index, Rank> > {
35 static const size_t value = Rank;
37 template <
typename Index, std::
size_t Rank>
38 struct array_size<const DimensionList<
Index, Rank> > {
39 static const size_t value = Rank;
42 template <DenseIndex n,
typename Index, std::
size_t Rank>
43 const Index array_get(DimensionList<Index, Rank>&) {
46 template <DenseIndex n,
typename Index, std::
size_t Rank>
47 const Index array_get(
const DimensionList<Index, Rank>&) {
51 template <
typename Index, std::
size_t Rank>
52 struct index_known_statically_impl<DimensionList<
Index, Rank> > {
53 EIGEN_DEVICE_FUNC
static constexpr
bool run(
const DenseIndex) {
return true; }
55 template <
typename Index, std::
size_t Rank>
56 struct index_known_statically_impl<const DimensionList<
Index, Rank> > {
57 EIGEN_DEVICE_FUNC
static constexpr
bool run(
const DenseIndex) {
return true; }
60 template <
typename Index, std::
size_t Rank>
61 struct all_indices_known_statically_impl<DimensionList<
Index, Rank> > {
62 EIGEN_DEVICE_FUNC
static constexpr
bool run() {
return true; }
64 template <
typename Index, std::
size_t Rank>
65 struct all_indices_known_statically_impl<const DimensionList<
Index, Rank> > {
66 EIGEN_DEVICE_FUNC
static constexpr
bool run() {
return true; }
69 template <
typename Index, std::
size_t Rank>
70 struct indices_statically_known_to_increase_impl<DimensionList<
Index, Rank> > {
71 EIGEN_DEVICE_FUNC
static constexpr
bool run() {
return true; }
73 template <
typename Index, std::
size_t Rank>
74 struct indices_statically_known_to_increase_impl<const DimensionList<
Index, Rank> > {
75 EIGEN_DEVICE_FUNC
static constexpr
bool run() {
return true; }
78 template <
typename Index, std::
size_t Rank>
79 struct index_statically_eq_impl<DimensionList<
Index, Rank> > {
80 static constexpr
bool run(
const DenseIndex i,
const DenseIndex value) {
return i == value; }
82 template <
typename Index, std::
size_t Rank>
83 struct index_statically_eq_impl<const DimensionList<
Index, Rank> > {
84 EIGEN_DEVICE_FUNC
static constexpr
bool run(
const DenseIndex i,
const DenseIndex value) {
return i == value; }
87 template <
typename Index, std::
size_t Rank>
88 struct index_statically_ne_impl<DimensionList<
Index, Rank> > {
89 EIGEN_DEVICE_FUNC
static constexpr
bool run(
const DenseIndex i,
const DenseIndex value) {
return i != value; }
91 template <
typename Index, std::
size_t Rank>
92 struct index_statically_ne_impl<const DimensionList<
Index, Rank> > {
93 static constexpr
bool run(
const DenseIndex i,
const DenseIndex value) {
return i != value; }
96 template <
typename Index, std::
size_t Rank>
97 struct index_statically_gt_impl<DimensionList<
Index, Rank> > {
98 EIGEN_DEVICE_FUNC
static constexpr
bool run(
const DenseIndex i,
const DenseIndex value) {
return i > value; }
100 template <
typename Index, std::
size_t Rank>
101 struct index_statically_gt_impl<const DimensionList<
Index, Rank> > {
102 EIGEN_DEVICE_FUNC
static constexpr
bool run(
const DenseIndex i,
const DenseIndex value) {
return i > value; }
105 template <
typename Index, std::
size_t Rank>
106 struct index_statically_lt_impl<DimensionList<
Index, Rank> > {
107 EIGEN_DEVICE_FUNC
static constexpr
bool run(
const DenseIndex i,
const DenseIndex value) {
return i < value; }
109 template <
typename Index, std::
size_t Rank>
110 struct index_statically_lt_impl<const DimensionList<
Index, Rank> > {
111 EIGEN_DEVICE_FUNC
static constexpr
bool run(
const DenseIndex i,
const DenseIndex value) {
return i < value; }
117 #endif // EIGEN_CXX11_TENSOR_TENSOR_DIMENSION_LIST_H Namespace containing all symbols from the Eigen library.
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index