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