10#ifndef EIGEN_CXX11_TENSOR_TENSOR_DIMENSION_LIST_H
11#define EIGEN_CXX11_TENSOR_TENSOR_DIMENSION_LIST_H
25template <
typename Index, std::
size_t Rank>
struct DimensionList {
26 EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
27 const Index operator[] (
const Index i)
const {
return i; }
32template<
typename Index, std::
size_t Rank>
struct array_size<DimensionList<
Index, Rank> > {
33 static const size_t value = Rank;
35template<
typename Index, std::
size_t Rank>
struct array_size<const DimensionList<
Index, Rank> > {
36 static const size_t value = Rank;
39template<DenseIndex n,
typename Index, std::
size_t Rank>
const Index array_get(DimensionList<Index, Rank>&) {
42template<DenseIndex n,
typename Index, std::
size_t Rank>
const Index array_get(
const DimensionList<Index, Rank>&) {
47#if EIGEN_HAS_CONSTEXPR
48template <
typename Index, std::
size_t Rank>
49struct index_known_statically_impl<DimensionList<
Index, Rank> > {
50 EIGEN_DEVICE_FUNC
static constexpr bool run(
const DenseIndex) {
54template <
typename Index, std::
size_t Rank>
55struct index_known_statically_impl<const DimensionList<
Index, Rank> > {
56 EIGEN_DEVICE_FUNC
static constexpr bool run(
const DenseIndex) {
61template <
typename Index, std::
size_t Rank>
62struct all_indices_known_statically_impl<DimensionList<
Index, Rank> > {
63 EIGEN_DEVICE_FUNC
static constexpr bool run() {
67template <
typename Index, std::
size_t Rank>
68struct all_indices_known_statically_impl<const DimensionList<
Index, Rank> > {
69 EIGEN_DEVICE_FUNC
static constexpr bool run() {
74template <
typename Index, std::
size_t Rank>
75struct indices_statically_known_to_increase_impl<DimensionList<
Index, Rank> > {
76 EIGEN_DEVICE_FUNC
static constexpr bool run() {
80template <
typename Index, std::
size_t Rank>
81struct indices_statically_known_to_increase_impl<const DimensionList<
Index, Rank> > {
82 EIGEN_DEVICE_FUNC
static constexpr bool run() {
87template <
typename Index, std::
size_t Rank>
88struct index_statically_eq_impl<DimensionList<
Index, Rank> > {
89 static constexpr bool run(
const DenseIndex i,
const DenseIndex value) {
93template <
typename Index, std::
size_t Rank>
94struct index_statically_eq_impl<const DimensionList<
Index, Rank> > {
95 EIGEN_DEVICE_FUNC
static constexpr bool run(
const DenseIndex i,
const DenseIndex value) {
100template <
typename Index, std::
size_t Rank>
101struct index_statically_ne_impl<DimensionList<
Index, Rank> > {
102 EIGEN_DEVICE_FUNC
static constexpr bool run(
const DenseIndex i,
const DenseIndex value) {
106template <
typename Index, std::
size_t Rank>
107struct index_statically_ne_impl<const DimensionList<
Index, Rank> > {
108 static constexpr bool run(
const DenseIndex i,
const DenseIndex value) {
113template <
typename Index, std::
size_t Rank>
114struct index_statically_gt_impl<DimensionList<
Index, Rank> > {
115 EIGEN_DEVICE_FUNC
static constexpr bool run(
const DenseIndex i,
const DenseIndex value) {
119template <
typename Index, std::
size_t Rank>
120struct index_statically_gt_impl<const DimensionList<
Index, Rank> > {
121 EIGEN_DEVICE_FUNC
static constexpr bool run(
const DenseIndex i,
const DenseIndex value) {
126template <
typename Index, std::
size_t Rank>
127struct index_statically_lt_impl<DimensionList<
Index, Rank> > {
128 EIGEN_DEVICE_FUNC
static constexpr bool run(
const DenseIndex i,
const DenseIndex value) {
132template <
typename Index, std::
size_t Rank>
133struct index_statically_lt_impl<const DimensionList<
Index, Rank> > {
134 EIGEN_DEVICE_FUNC
static constexpr bool run(
const DenseIndex i,
const DenseIndex value) {
140template <
typename Index, std::
size_t Rank>
141struct index_known_statically_impl<DimensionList<
Index, Rank> > {
142 EIGEN_DEVICE_FUNC
static EIGEN_ALWAYS_INLINE
bool run(
const DenseIndex) {
146template <
typename Index, std::
size_t Rank>
147struct index_known_statically_impl<const DimensionList<
Index, Rank> > {
148 EIGEN_DEVICE_FUNC
static EIGEN_ALWAYS_INLINE
bool run(
const DenseIndex) {
153template <
typename Index, std::
size_t Rank>
154struct all_indices_known_statically_impl<DimensionList<
Index, Rank> > {
155 EIGEN_DEVICE_FUNC
static EIGEN_ALWAYS_INLINE
bool run() {
159template <
typename Index, std::
size_t Rank>
160struct all_indices_known_statically_impl<const DimensionList<
Index, Rank> > {
161 EIGEN_DEVICE_FUNC
static EIGEN_ALWAYS_INLINE
bool run() {
166template <
typename Index, std::
size_t Rank>
167struct indices_statically_known_to_increase_impl<DimensionList<
Index, Rank> > {
168 static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
bool run() {
172template <
typename Index, std::
size_t Rank>
173struct indices_statically_known_to_increase_impl<const DimensionList<
Index, Rank> > {
174 static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
bool run() {
179template <
typename Index, std::
size_t Rank>
180struct index_statically_eq_impl<DimensionList<
Index, Rank> > {
181 static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
bool run(
const DenseIndex,
const DenseIndex) {
185template <
typename Index, std::
size_t Rank>
186struct index_statically_eq_impl<const DimensionList<
Index, Rank> > {
187 static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
bool run(
const DenseIndex,
const DenseIndex) {
192template <
typename Index, std::
size_t Rank>
193struct index_statically_ne_impl<DimensionList<
Index, Rank> > {
194 static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
bool run(
const DenseIndex,
const DenseIndex){
198template <
typename Index, std::
size_t Rank>
199struct index_statically_ne_impl<const DimensionList<
Index, Rank> > {
200 static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
bool run(
const DenseIndex,
const DenseIndex) {
205template <
typename Index, std::
size_t Rank>
206struct index_statically_gt_impl<DimensionList<
Index, Rank> > {
207 static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
bool run(
const DenseIndex,
const DenseIndex) {
211template <
typename Index, std::
size_t Rank>
212struct index_statically_gt_impl<const DimensionList<
Index, Rank> > {
213 static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
bool run(
const DenseIndex,
const DenseIndex) {
218template <
typename Index, std::
size_t Rank>
219struct index_statically_lt_impl<DimensionList<
Index, Rank> > {
220 static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
bool run(
const DenseIndex,
const DenseIndex) {
224template <
typename Index, std::
size_t Rank>
225struct index_statically_lt_impl<const DimensionList<
Index, Rank> > {
226 static EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
bool run(
const DenseIndex,
const DenseIndex) {
Namespace containing all symbols from the Eigen library.
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index