TensorDimensions.h
Go to the documentation of this file.
1 // This file is part of Eigen, a lightweight C++ template library
2 // for linear algebra.
3 //
4 // Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>
5 //
6 // This Source Code Form is subject to the terms of the Mozilla
7 // Public License v. 2.0. If a copy of the MPL was not distributed
8 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 
10 #ifndef EIGEN_CXX11_TENSOR_TENSOR_DIMENSIONS_H
11 #define EIGEN_CXX11_TENSOR_TENSOR_DIMENSIONS_H
12 
13 
14 namespace Eigen {
15 
32 // Boilerplate code
33 namespace internal {
34 
35 template<std::ptrdiff_t n, typename Dimension> struct dget {
36  static const std::ptrdiff_t value = get<n, Dimension>::value;
37 };
38 
39 
40 template<typename Index, std::ptrdiff_t NumIndices, std::ptrdiff_t n, bool RowMajor>
42 {
43  template <typename Dimensions> EIGEN_DEVICE_FUNC
45  const Dimensions& dimensions)
46  {
47  return array_get<RowMajor ? n - 1 : (NumIndices - n)>(indices) +
48  dget<RowMajor ? n - 1 : (NumIndices - n), Dimensions>::value *
50  }
51 };
52 
53 template<typename Index, std::ptrdiff_t NumIndices, bool RowMajor>
55 {
56  template <typename Dimensions> EIGEN_DEVICE_FUNC
57  static EIGEN_STRONG_INLINE Index run(array<Index, NumIndices> const&, const Dimensions&)
58  {
59  return 0;
60  }
61 };
62 
63 template<typename Index, std::ptrdiff_t n>
65 {
66  template <typename Dimensions> EIGEN_DEVICE_FUNC
67  static EIGEN_STRONG_INLINE Index run(const Index index,
68  const Dimensions& dimensions)
69  {
70  const Index mult = (index == n-1) ? 1 : 0;
71  return array_get<n-1>(dimensions) * mult +
73  }
74 };
75 
76 template<typename Index>
78 {
79  template <typename Dimensions> EIGEN_DEVICE_FUNC
81  const Dimensions&)
82  {
83  return 0;
84  }
85  };
86 
87 } // end namespace internal
88 
89 
90 // Fixed size
91 #ifndef EIGEN_EMULATE_CXX11_META_H
92 template <typename std::ptrdiff_t... Indices>
93 struct Sizes {
94  typedef internal::numeric_list<std::ptrdiff_t, Indices...> Base;
95  const Base t = Base();
96  static const std::ptrdiff_t total_size = internal::arg_prod(Indices...);
97  static const ptrdiff_t count = Base::count;
98 
99  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t rank() const {
100  return Base::count;
101  }
102 
104  return internal::arg_prod(Indices...);
105  }
106 
108  template <typename DenseIndex>
110  // todo: add assertion
111  }
112 #if EIGEN_HAS_VARIADIC_TEMPLATES
113  template <typename... DenseIndex> EIGEN_DEVICE_FUNC Sizes(DenseIndex...) { }
114  explicit EIGEN_DEVICE_FUNC Sizes(std::initializer_list<std::ptrdiff_t> /*l*/) {
115  // todo: add assertion
116  }
117 #endif
118 
119  template <typename T> Sizes& operator = (const T& /*other*/) {
120  // add assertion failure if the size of other is different
121  return *this;
122  }
123 
124  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t operator[] (const std::ptrdiff_t index) const {
126  }
127 
128  template <typename DenseIndex> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
131  }
132  template <typename DenseIndex> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
135  }
136 };
137 
138 namespace internal {
139 template <typename std::ptrdiff_t... Indices>
141  return Sizes<Indices...>::total_size;
142 }
143 }
144 
145 #else
146 
147 template <std::ptrdiff_t n>
148 struct non_zero_size {
149  typedef internal::type2val<std::ptrdiff_t, n> type;
150 };
151 template <>
152 struct non_zero_size<0> {
153  typedef internal::null_type type;
154 };
155 
156 template <std::ptrdiff_t V1=0, std::ptrdiff_t V2=0, std::ptrdiff_t V3=0, std::ptrdiff_t V4=0, std::ptrdiff_t V5=0> struct Sizes {
158  static const std::ptrdiff_t count = Base::count;
159  static const std::ptrdiff_t total_size = internal::arg_prod<Base>::value;
160 
161  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ptrdiff_t rank() const {
162  return count;
163  }
164 
165  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ptrdiff_t TotalSize() {
167  }
168 
169  Sizes() { }
170  template <typename DenseIndex>
171  explicit Sizes(const array<DenseIndex, Base::count>& /*indices*/) {
172  // todo: add assertion
173  }
174  template <typename T> Sizes& operator = (const T& /*other*/) {
175  // add assertion failure if the size of other is different
176  return *this;
177  }
178 
179 #if EIGEN_HAS_VARIADIC_TEMPLATES
180  template <typename... DenseIndex> Sizes(DenseIndex... /*indices*/) { }
181  explicit Sizes(std::initializer_list<std::ptrdiff_t>) {
182  // todo: add assertion
183  }
184 #else
185  EIGEN_DEVICE_FUNC explicit Sizes(const DenseIndex) {
186  }
188  }
190  }
191  EIGEN_DEVICE_FUNC Sizes(const DenseIndex, const DenseIndex, const DenseIndex, const DenseIndex) {
192  }
193  EIGEN_DEVICE_FUNC Sizes(const DenseIndex, const DenseIndex, const DenseIndex, const DenseIndex, const DenseIndex) {
194  }
195 #endif
196 
198  switch (index) {
199  case 0:
201  case 1:
203  case 2:
205  case 3:
207  case 4:
209  default:
210  eigen_assert(false && "index overflow");
211  return static_cast<Index>(-1);
212  }
213  }
214 
215  template <typename DenseIndex> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
216  ptrdiff_t IndexOfColMajor(const array<DenseIndex, Base::count>& indices) const {
218  }
219  template <typename DenseIndex> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
220  ptrdiff_t IndexOfRowMajor(const array<DenseIndex, Base::count>& indices) const {
222  }
223 };
224 
225 namespace internal {
226 template <std::ptrdiff_t V1, std::ptrdiff_t V2, std::ptrdiff_t V3, std::ptrdiff_t V4, std::ptrdiff_t V5>
227 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t array_prod(const Sizes<V1, V2, V3, V4, V5>&) {
229 }
230 }
231 
232 #endif
233 
234 // Boilerplate
235 namespace internal {
236 template<typename Index, std::ptrdiff_t NumIndices, std::ptrdiff_t n, bool RowMajor>
238 {
241  {
242  return array_get<RowMajor ? n : (NumIndices - n - 1)>(indices) +
243  array_get<RowMajor ? n : (NumIndices - n - 1)>(dimensions) *
245  }
246 };
247 
248 template<typename Index, std::ptrdiff_t NumIndices, bool RowMajor>
250 {
253  {
254  return array_get<RowMajor ? 0 : NumIndices - 1>(indices);
255  }
256 };
257 } // end namespace internal
258 
259 
260 
261 // Dynamic size
262 template <typename DenseIndex, int NumDims>
263 struct DSizes : array<DenseIndex, NumDims> {
265  static const int count = NumDims;
266 
268  return NumDims;
269  }
270 
272  return (NumDims == 0) ? 1 : internal::array_prod(*static_cast<const Base*>(this));
273  }
274 
276  for (int i = 0 ; i < NumDims; ++i) {
277  (*this)[i] = 0;
278  }
279  }
281 
283  eigen_assert(NumDims == 1);
284  (*this)[0] = i0;
285  }
286 
288  for (int i = 0 ; i < NumDims; ++i) {
289  (*this)[i] = a[i];
290  }
291  }
292 
293  // Enable DSizes index type promotion only if we are promoting to the
294  // larger type, e.g. allow to promote dimensions of type int to long.
295  template<typename OtherIndex>
298  // Default template parameters require c++11.
299  typename internal::enable_if<
301  DenseIndex,
303  DenseIndex,
304  OtherIndex
305  >::type
306  >::value, void*>::type = 0) {
307  for (int i = 0; i < NumDims; ++i) {
308  (*this)[i] = static_cast<DenseIndex>(other[i]);
309  }
310  }
311 
312 #ifdef EIGEN_HAS_INDEX_LIST
313  template <typename FirstType, typename... OtherTypes>
315  explicit DSizes(const Eigen::IndexList<FirstType, OtherTypes...>& dimensions) {
316  for (int i = 0; i < dimensions.count; ++i) {
317  (*this)[i] = dimensions[i];
318  }
319  }
320 #endif
321 
322 #ifndef EIGEN_EMULATE_CXX11_META_H
323  template <typename std::ptrdiff_t... Indices>
325  for (int i = 0 ; i < NumDims; ++i) {
326  (*this)[i] = a[i];
327  }
328  }
329 #else
330  template <std::ptrdiff_t V1, std::ptrdiff_t V2, std::ptrdiff_t V3, std::ptrdiff_t V4, std::ptrdiff_t V5>
332  for (int i = 0 ; i < NumDims; ++i) {
333  (*this)[i] = a[i];
334  }
335  }
336 #endif
337 
338 #if EIGEN_HAS_VARIADIC_TEMPLATES
339  template<typename... IndexTypes> EIGEN_DEVICE_FUNC
340  EIGEN_STRONG_INLINE explicit DSizes(DenseIndex firstDimension, DenseIndex secondDimension, IndexTypes... otherDimensions) : Base({{firstDimension, secondDimension, otherDimensions...}}) {
341  EIGEN_STATIC_ASSERT(sizeof...(otherDimensions) + 2 == NumDims, YOU_MADE_A_PROGRAMMING_MISTAKE)
342  }
343 #else
345  eigen_assert(NumDims == 2);
346  (*this)[0] = i0;
347  (*this)[1] = i1;
348  }
350  eigen_assert(NumDims == 3);
351  (*this)[0] = i0;
352  (*this)[1] = i1;
353  (*this)[2] = i2;
354  }
356  eigen_assert(NumDims == 4);
357  (*this)[0] = i0;
358  (*this)[1] = i1;
359  (*this)[2] = i2;
360  (*this)[3] = i3;
361  }
362  EIGEN_DEVICE_FUNC DSizes(const DenseIndex i0, const DenseIndex i1, const DenseIndex i2, const DenseIndex i3, const DenseIndex i4) {
363  eigen_assert(NumDims == 5);
364  (*this)[0] = i0;
365  (*this)[1] = i1;
366  (*this)[2] = i2;
367  (*this)[3] = i3;
368  (*this)[4] = i4;
369  }
370 #endif
371 
373  *static_cast<Base*>(this) = other;
374  return *this;
375  }
376 
377  // A constexpr would be so much better here
380  }
383  }
384 };
385 
386 template <typename IndexType, int NumDims>
387 std::ostream& operator<<(std::ostream& os,
388  const DSizes<IndexType, NumDims>& dims) {
389  os << "[";
390  for (int i = 0; i < NumDims; ++i) {
391  if (i > 0) os << ", ";
392  os << dims[i];
393  }
394  os << "]";
395  return os;
396 }
397 
398 // Boilerplate
399 namespace internal {
400 template<typename Index, std::ptrdiff_t NumIndices, std::ptrdiff_t n, bool RowMajor>
402 {
404  Index run(array<Index, NumIndices> const& indices, std::vector<DenseIndex> const& dimensions)
405  {
406  return array_get<RowMajor ? n : (NumIndices - n - 1)>(indices) +
407  array_get<RowMajor ? n : (NumIndices - n - 1)>(dimensions) *
409  }
410 };
411 
412 template<typename Index, std::ptrdiff_t NumIndices, bool RowMajor>
414 {
416  Index run(array<Index, NumIndices> const& indices, std::vector<DenseIndex> const&)
417  {
418  return array_get<RowMajor ? 0 : NumIndices - 1>(indices);
419  }
420 };
421 } // end namespace internal
422 
423 
424 namespace internal {
425 
426 template <typename DenseIndex, int NumDims> struct array_size<const DSizes<DenseIndex, NumDims> > {
427  static const ptrdiff_t value = NumDims;
428 };
429 template <typename DenseIndex, int NumDims> struct array_size<DSizes<DenseIndex, NumDims> > {
430  static const ptrdiff_t value = NumDims;
431 };
432 #ifndef EIGEN_EMULATE_CXX11_META_H
433 template <typename std::ptrdiff_t... Indices> struct array_size<const Sizes<Indices...> > {
434 static const std::ptrdiff_t value = Sizes<Indices...>::count;
435 };
436 template <typename std::ptrdiff_t... Indices> struct array_size<Sizes<Indices...> > {
437 static const std::ptrdiff_t value = Sizes<Indices...>::count;
438 };
439 template <std::ptrdiff_t n, typename std::ptrdiff_t... Indices> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t array_get(const Sizes<Indices...>&) {
440  return get<n, internal::numeric_list<std::ptrdiff_t, Indices...> >::value;
441 }
442 template <std::ptrdiff_t n> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t array_get(const Sizes<>&) {
443  eigen_assert(false && "should never be called");
444  return -1;
445 }
446 #else
447 template <std::ptrdiff_t V1, std::ptrdiff_t V2, std::ptrdiff_t V3, std::ptrdiff_t V4, std::ptrdiff_t V5> struct array_size<const Sizes<V1,V2,V3,V4,V5> > {
448  static const ptrdiff_t value = Sizes<V1,V2,V3,V4,V5>::count;
449 };
450 template <std::ptrdiff_t V1, std::ptrdiff_t V2, std::ptrdiff_t V3, std::ptrdiff_t V4, std::ptrdiff_t V5> struct array_size<Sizes<V1,V2,V3,V4,V5> > {
451  static const ptrdiff_t value = Sizes<V1,V2,V3,V4,V5>::count;
452 };
453 template <std::ptrdiff_t n, std::ptrdiff_t V1, std::ptrdiff_t V2, std::ptrdiff_t V3, std::ptrdiff_t V4, std::ptrdiff_t V5> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t array_get(const Sizes<V1,V2,V3,V4,V5>&) {
454  return get<n, typename Sizes<V1,V2,V3,V4,V5>::Base>::value;
455 }
456 
457 #endif
458 
459 
460 template <typename Dims1, typename Dims2, ptrdiff_t n, ptrdiff_t m>
462  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool run(Dims1&, Dims2&) {
463  return false;
464  }
465 };
466 template <typename Dims1, typename Dims2, ptrdiff_t n>
467 struct sizes_match_below_dim<Dims1, Dims2, n, n> {
468  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool run(Dims1& dims1, Dims2& dims2) {
469  return (array_get<n-1>(dims1) == array_get<n-1>(dims2)) &&
471  }
472 };
473 template <typename Dims1, typename Dims2>
474 struct sizes_match_below_dim<Dims1, Dims2, 0, 0> {
475  static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool run(Dims1&, Dims2&) {
476  return true;
477  }
478 };
479 
480 } // end namespace internal
481 
482 
483 template <typename Dims1, typename Dims2>
486 }
487 
488 } // end namespace Eigen
489 
490 #endif // EIGEN_CXX11_TENSOR_TENSOR_DIMENSIONS_H
Eigen::internal::fixed_size_tensor_index_linearization_helper::run
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index run(array< Index, NumIndices > const &indices, const Dimensions &dimensions)
Definition: TensorDimensions.h:44
Eigen::Sizes::operator[]
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t operator[](const std::ptrdiff_t index) const
Definition: TensorDimensions.h:124
Eigen::internal::fixed_size_tensor_index_linearization_helper< Index, NumIndices, 0, RowMajor >::run
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index run(array< Index, NumIndices > const &, const Dimensions &)
Definition: TensorDimensions.h:57
Eigen::Sizes::rank
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t rank() const
Definition: TensorDimensions.h:99
Eigen::internal::arg_prod
constexpr EIGEN_DEVICE_FUNCdecltype(reduce< product_op, Ts... >::run((*((Ts *) 0))...)) EIGEN_STRONG_INLIN arg_prod)(Ts... ts)
Definition: CXX11Meta.h:324
Eigen::internal::sizes_match_below_dim< Dims1, Dims2, n, n >::run
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool run(Dims1 &dims1, Dims2 &dims2)
Definition: TensorDimensions.h:468
Eigen::internal::array_size::value
@ value
Definition: Meta.h:446
EIGEN_DEVICE_FUNC
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:976
Eigen
Namespace containing all symbols from the Eigen library.
Definition: jet.h:637
dimensions
const std::vector< size_t > dimensions
Definition: testVerticalBlockMatrix.cpp:27
Eigen::operator<<
std::ostream & operator<<(std::ostream &os, const DSizes< IndexType, NumDims > &dims)
Definition: TensorDimensions.h:387
gtsam.examples.DogLegOptimizerExample.type
type
Definition: DogLegOptimizerExample.py:111
Eigen::internal::fixed_size_tensor_index_extraction_helper::run
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index run(const Index index, const Dimensions &dimensions)
Definition: TensorDimensions.h:67
Eigen::array
Definition: EmulateArray.h:21
Eigen::internal::tensor_index_linearization_helper
Definition: TensorDimensions.h:237
Eigen::DSizes::DSizes
EIGEN_DEVICE_FUNC DSizes(const Sizes< Indices... > &a)
Definition: TensorDimensions.h:324
Eigen::internal::tensor_vsize_index_linearization_helper::run
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index run(array< Index, NumIndices > const &indices, std::vector< DenseIndex > const &dimensions)
Definition: TensorDimensions.h:404
Eigen::DSizes::DSizes
EIGEN_DEVICE_FUNC DSizes(const DenseIndex i0, const DenseIndex i1, const DenseIndex i2)
Definition: TensorDimensions.h:349
eigen_assert
#define eigen_assert(x)
Definition: Macros.h:1037
Eigen::DSizes::DSizes
EIGEN_DEVICE_FUNC DSizes(const DimensionList< DenseIndex, NumDims > &a)
Definition: TensorDimensions.h:287
Eigen::DSizes::DSizes
EIGEN_DEVICE_FUNC DSizes(const array< DenseIndex, NumDims > &a)
Definition: TensorDimensions.h:280
Eigen::Sizes::count
static const ptrdiff_t count
Definition: TensorDimensions.h:97
Eigen::Sizes::t
const Base t
Definition: TensorDimensions.h:95
Eigen::Sizes::total_size
static const std::ptrdiff_t total_size
Definition: TensorDimensions.h:96
type
Definition: pytypes.h:1525
Eigen::internal::tensor_index_linearization_helper< Index, NumIndices, 0, RowMajor >::run
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index run(array< Index, NumIndices > const &indices, array< Index, NumIndices > const &)
Definition: TensorDimensions.h:252
Eigen::RowMajor
@ RowMajor
Definition: Constants.h:321
Eigen::internal::fixed_size_tensor_index_linearization_helper
Definition: TensorDimensions.h:41
os
ofstream os("timeSchurFactors.csv")
Eigen::DSizes::DSizes
EIGEN_DEVICE_FUNC DSizes(const array< OtherIndex, NumDims > &other, typename internal::enable_if< internal::is_same< DenseIndex, typename internal::promote_index_type< DenseIndex, OtherIndex >::type >::value, void * >::type=0)
Definition: TensorDimensions.h:297
Eigen::DSizes
Definition: TensorDimensions.h:263
Eigen::internal::array_get
const Index array_get(DimensionList< Index, Rank > &)
Definition: TensorDimensionList.h:39
Eigen::Sizes
Definition: TensorDimensions.h:93
test_eigen_tensor.indices
indices
Definition: test_eigen_tensor.py:33
Eigen::dimensions_match
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool dimensions_match(Dims1 dims1, Dims2 dims2)
Definition: TensorDimensions.h:484
n
int n
Definition: BiCGSTAB_simple.cpp:1
Eigen::DSizes::IndexOfRowMajor
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DenseIndex IndexOfRowMajor(const array< DenseIndex, NumDims > &indices) const
Definition: TensorDimensions.h:381
Eigen::DimensionList
Definition: TensorDimensionList.h:25
Eigen::internal::sizes_match_below_dim::run
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool run(Dims1 &, Dims2 &)
Definition: TensorDimensions.h:462
Eigen::Sizes::Base
internal::numeric_list< std::ptrdiff_t, Indices... > Base
Definition: TensorDimensions.h:94
Eigen::internal::tensor_vsize_index_linearization_helper
Definition: TensorDimensions.h:401
Eigen::Sizes::TotalSize
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t TotalSize()
Definition: TensorDimensions.h:103
Eigen::internal::get
Definition: CXX11Meta.h:115
Eigen::DSizes::Base
array< DenseIndex, NumDims > Base
Definition: TensorDimensions.h:264
Eigen::DSizes::rank
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index rank() const
Definition: TensorDimensions.h:267
Eigen::Sizes::Sizes
EIGEN_DEVICE_FUNC Sizes(const array< DenseIndex, Base::count > &)
Definition: TensorDimensions.h:109
Eigen::internal::fixed_size_tensor_index_extraction_helper
Definition: TensorDimensions.h:64
EIGEN_STRONG_INLINE
#define EIGEN_STRONG_INLINE
Definition: Macros.h:917
Eigen::internal::tensor_vsize_index_linearization_helper< Index, NumIndices, 0, RowMajor >::run
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index run(array< Index, NumIndices > const &indices, std::vector< DenseIndex > const &)
Definition: TensorDimensions.h:416
Eigen::DSizes::TotalSize
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DenseIndex TotalSize() const
Definition: TensorDimensions.h:271
Eigen::internal::fixed_size_tensor_index_extraction_helper< Index, 0 >::run
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index run(const Index, const Dimensions &)
Definition: TensorDimensions.h:80
Eigen::internal::dget::value
static const std::ptrdiff_t value
Definition: TensorDimensions.h:36
Eigen::DSizes::DSizes
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DSizes()
Definition: TensorDimensions.h:275
gtsam.examples.DogLegOptimizerExample.run
def run(args)
Definition: DogLegOptimizerExample.py:21
EIGEN_ALWAYS_INLINE
#define EIGEN_ALWAYS_INLINE
Definition: Macros.h:932
Eigen::Triplet< double >
Eigen::DSizes::DSizes
EIGEN_DEVICE_FUNC DSizes(const DenseIndex i0, const DenseIndex i1, const DenseIndex i2, const DenseIndex i3, const DenseIndex i4)
Definition: TensorDimensions.h:362
Eigen::internal::tensor_index_linearization_helper::run
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index run(array< Index, NumIndices > const &indices, array< Index, NumIndices > const &dimensions)
Definition: TensorDimensions.h:240
Eigen::DSizes::DSizes
EIGEN_DEVICE_FUNC DSizes(const DenseIndex i0, const DenseIndex i1)
Definition: TensorDimensions.h:344
Eigen::internal::array_prod
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t array_prod(const Sizes< Indices... > &)
Definition: TensorDimensions.h:140
Eigen::internal::array_size
Definition: Meta.h:445
Eigen::DSizes::DSizes
EIGEN_DEVICE_FUNC DSizes(const DenseIndex i0)
Definition: TensorDimensions.h:282
Eigen::internal::numeric_list
Definition: CXX11Meta.h:35
i0
double i0(double x)
Definition: i0.c:149
a
ArrayXXi a
Definition: Array_initializer_list_23_cxx11.cpp:1
array
Definition: numpy.h:821
Eigen::DSizes::DSizes
EIGEN_DEVICE_FUNC DSizes(const DenseIndex i0, const DenseIndex i1, const DenseIndex i2, const DenseIndex i3)
Definition: TensorDimensions.h:355
i1
double i1(double x)
Definition: i1.c:150
EIGEN_STATIC_ASSERT
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
Definition: StaticAssert.h:127
Eigen::DenseIndex
EIGEN_DEFAULT_DENSE_INDEX_TYPE DenseIndex
Definition: Meta.h:66
Eigen::internal::dget
Definition: TensorDimensions.h:35
Eigen::internal::sizes_match_below_dim< Dims1, Dims2, 0, 0 >::run
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool run(Dims1 &, Dims2 &)
Definition: TensorDimensions.h:475
Eigen::DSizes::operator=
EIGEN_DEVICE_FUNC DSizes & operator=(const array< DenseIndex, NumDims > &other)
Definition: TensorDimensions.h:372
Eigen::DSizes::IndexOfColMajor
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DenseIndex IndexOfColMajor(const array< DenseIndex, NumDims > &indices) const
Definition: TensorDimensions.h:378
Eigen::Sizes::Sizes
EIGEN_DEVICE_FUNC Sizes()
Definition: TensorDimensions.h:107
Eigen::internal::sizes_match_below_dim
Definition: TensorDimensions.h:461
Eigen::Sizes::IndexOfColMajor
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ptrdiff_t IndexOfColMajor(const array< DenseIndex, Base::count > &indices) const
Definition: TensorDimensions.h:129
Eigen::Sizes::IndexOfRowMajor
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ptrdiff_t IndexOfRowMajor(const array< DenseIndex, Base::count > &indices) const
Definition: TensorDimensions.h:133
Eigen::internal::is_same
Definition: Meta.h:148
Eigen::Sizes::operator=
Sizes & operator=(const T &)
Definition: TensorDimensions.h:119
Eigen::internal::numeric_list::count
constexpr static std::size_t count
Definition: CXX11Meta.h:35
internal
Definition: BandTriangularSolver.h:13
Eigen::internal::enable_if
Definition: Meta.h:273
Indices
std::vector< size_t > Indices
Definition: testPartialPriorFactor.cpp:37
Base
Definition: test_virtual_functions.cpp:156
Eigen::internal::promote_index_type
Definition: XprHelper.h:120
test_callbacks.value
value
Definition: test_callbacks.py:160
i
int i
Definition: BiCGSTAB_step_by_step.cpp:9
pybind_wrapper_test_script.other
other
Definition: pybind_wrapper_test_script.py:42
Eigen::Index
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
Eigen::DSizes::count
static const int count
Definition: TensorDimensions.h:265


gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:37:33