IndexedViewHelper.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) 2017 Gael Guennebaud <gael.guennebaud@inria.fr>
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_INDEXED_VIEW_HELPER_H
11 #define EIGEN_INDEXED_VIEW_HELPER_H
12 
13 // IWYU pragma: private
14 #include "../InternalHeaderCheck.h"
15 
16 namespace Eigen {
17 
18 namespace internal {
20 
21 struct all_t {};
22 
23 } // namespace internal
24 
25 namespace placeholders {
26 
28 
48 static constexpr const last_t last;
49 
54 
67 #ifdef EIGEN_PARSED_BY_DOXYGEN
68 static constexpr auto lastp1 = last + fix<1>;
69 #else
70 // Using a FixedExpr<1> expression is important here to make sure the compiler
71 // can fully optimize the computation starting indices with zero overhead.
72 static constexpr lastp1_t lastp1 = lastp1_t{};
73 #endif
74 
79 static constexpr lastp1_t end = lastp1;
80 
86 static constexpr Eigen::internal::all_t all;
87 
88 } // namespace placeholders
89 
90 namespace internal {
91 
92 // Evaluate a symbolic expression or constant given the "size" of an object, allowing
93 // any symbols like `last` to be evaluated. The default here assumes a dynamic constant.
94 template <typename Expr, int SizeAtCompileTime, typename EnableIf = void>
96  static constexpr Index ValueAtCompileTime = Undefined;
97  static Index eval(const Expr& expr, Index /*size*/) { return static_cast<Index>(expr); }
98 };
99 
100 // Symbolic expression with size known at compile-time.
101 template <typename Expr, int SizeAtCompileTime>
102 struct SymbolicExpressionEvaluator<Expr, SizeAtCompileTime, std::enable_if_t<symbolic::is_symbolic<Expr>::value>> {
103  static constexpr Index ValueAtCompileTime =
104  Expr::Derived::eval_at_compile_time(Eigen::placeholders::last = fix<SizeAtCompileTime - 1>);
105  static Index eval(const Expr& expr, Index /*size*/) {
106  return expr.eval(Eigen::placeholders::last = fix<SizeAtCompileTime - 1>);
107  }
108 };
109 
110 // Symbolic expression with dynamic size.
111 template <typename Expr>
112 struct SymbolicExpressionEvaluator<Expr, Dynamic, std::enable_if_t<symbolic::is_symbolic<Expr>::value>> {
113  static constexpr Index ValueAtCompileTime = Undefined;
114  static Index eval(const Expr& expr, Index size) { return expr.eval(Eigen::placeholders::last = size - 1); }
115 };
116 
117 // Fixed int.
118 template <int N, int SizeAtCompileTime>
119 struct SymbolicExpressionEvaluator<FixedInt<N>, SizeAtCompileTime, void> {
120  static constexpr Index ValueAtCompileTime = static_cast<Index>(N);
121  static Index eval(const FixedInt<N>& /*expr*/, Index /*size*/) { return ValueAtCompileTime; }
122 };
123 
124 //--------------------------------------------------------------------------------
125 // Handling of generic indices (e.g. array)
126 //--------------------------------------------------------------------------------
127 
128 // Potentially wrap indices in a type that is better-suited for IndexedView evaluation.
129 template <typename Indices, int NestedSizeAtCompileTime, typename EnableIf = void>
131  using type = Indices;
132  static const type& CreateIndexSequence(const Indices& indices, Index /*nested_size*/) { return indices; }
133 };
134 
135 // Extract compile-time and runtime first, size, increments.
136 template <typename Indices, typename EnableIf = void>
138  static constexpr Index FirstAtCompileTime = Undefined;
140  static constexpr Index IncrAtCompileTime = Undefined;
141 
142  static constexpr Index first(const Indices& indices) { return static_cast<Index>(indices[0]); }
143  static constexpr Index size(const Indices& indices) { return index_list_size(indices); }
144  static constexpr Index incr(const Indices& /*indices*/) { return Undefined; }
145 };
146 
147 //--------------------------------------------------------------------------------
148 // Handling of ArithmeticSequence
149 //--------------------------------------------------------------------------------
150 
151 template <Index FirstAtCompileTime_, Index SizeAtCompileTime_, Index IncrAtCompileTime_>
153  public:
154  static constexpr Index FirstAtCompileTime = FirstAtCompileTime_;
155  static constexpr Index SizeAtCompileTime = SizeAtCompileTime_;
156  static constexpr Index IncrAtCompileTime = IncrAtCompileTime_;
157 
159  constexpr Index operator[](Index i) const { return first() + i * incr(); }
160  constexpr Index first() const noexcept { return first_.value(); }
161  constexpr Index size() const noexcept { return size_.value(); }
162  constexpr Index incr() const noexcept { return incr_.value(); }
163 
164  private:
168 };
169 
170 template <typename FirstType, typename SizeType, typename IncrType, int NestedSizeAtCompileTime>
171 struct IndexedViewHelperIndicesWrapper<ArithmeticSequence<FirstType, SizeType, IncrType>, NestedSizeAtCompileTime,
172  void> {
173  static constexpr Index EvalFirstAtCompileTime =
175  static constexpr Index EvalSizeAtCompileTime =
177  static constexpr Index EvalIncrAtCompileTime =
179 
180  static constexpr Index FirstAtCompileTime =
181  (int(EvalFirstAtCompileTime) == Undefined) ? Index(DynamicIndex) : EvalFirstAtCompileTime;
182  static constexpr Index SizeAtCompileTime =
183  (int(EvalSizeAtCompileTime) == Undefined) ? Index(Dynamic) : EvalSizeAtCompileTime;
184  static constexpr Index IncrAtCompileTime =
185  (int(EvalIncrAtCompileTime) == Undefined) ? Index(DynamicIndex) : EvalIncrAtCompileTime;
186 
189 
190  static type CreateIndexSequence(const Indices& indices, Index nested_size) {
191  Index first =
193  Index size =
195  Index incr =
197  return type(first, size, incr);
198  }
199 };
200 
201 template <Index FirstAtCompileTime_, Index SizeAtCompileTime_, Index IncrAtCompileTime_>
202 struct IndexedViewHelper<ArithmeticSequenceRange<FirstAtCompileTime_, SizeAtCompileTime_, IncrAtCompileTime_>, void> {
203  public:
205  static constexpr Index FirstAtCompileTime = Indices::FirstAtCompileTime;
206  static constexpr Index SizeAtCompileTime = Indices::SizeAtCompileTime;
207  static constexpr Index IncrAtCompileTime = Indices::IncrAtCompileTime;
208  static Index first(const Indices& indices) { return indices.first(); }
209  static Index size(const Indices& indices) { return indices.size(); }
210  static Index incr(const Indices& indices) { return indices.incr(); }
211 };
212 
213 //--------------------------------------------------------------------------------
214 // Handling of a single index.
215 //--------------------------------------------------------------------------------
216 
217 template <Index ValueAtCompileTime>
218 class SingleRange {
219  public:
220  static constexpr Index FirstAtCompileTime = ValueAtCompileTime;
221  static constexpr Index SizeAtCompileTime = Index(1);
222  static constexpr Index IncrAtCompileTime = Index(1); // Needs to be 1 to be treated as block-like.
223 
224  constexpr SingleRange(Index v) noexcept : value_(v) {}
225  constexpr Index operator[](Index) const noexcept { return first(); }
226  constexpr Index first() const noexcept { return value_.value(); }
227  constexpr Index size() const noexcept { return SizeAtCompileTime; }
228  constexpr Index incr() const noexcept { return IncrAtCompileTime; }
229 
230  private:
231  variable_if_dynamicindex<Index, int(ValueAtCompileTime)> value_;
232 };
233 
234 template <typename T>
235 struct is_single_range : public std::false_type {};
236 
237 template <Index ValueAtCompileTime>
238 struct is_single_range<SingleRange<ValueAtCompileTime>> : public std::true_type {};
239 
240 template <typename SingleIndex, int NestedSizeAtCompileTime>
242  SingleIndex, NestedSizeAtCompileTime,
243  std::enable_if_t<std::is_integral<SingleIndex>::value || symbolic::is_symbolic<SingleIndex>::value>> {
244  static constexpr Index EvalValueAtCompileTime =
246  static constexpr Index ValueAtCompileTime =
247  (int(EvalValueAtCompileTime) == Undefined) ? Index(DynamicIndex) : EvalValueAtCompileTime;
249  static type CreateIndexSequence(const SingleIndex& index, Index nested_size) {
251  }
252 };
253 
254 template <int N, int NestedSizeAtCompileTime>
255 struct IndexedViewHelperIndicesWrapper<FixedInt<N>, NestedSizeAtCompileTime, void> {
256  using type = SingleRange<Index(N)>;
257  static type CreateIndexSequence(const FixedInt<N>& /*index*/) { return type(Index(N)); }
258 };
259 
260 template <Index ValueAtCompileTime>
261 struct IndexedViewHelper<SingleRange<ValueAtCompileTime>, void> {
263  static constexpr Index FirstAtCompileTime = Indices::FirstAtCompileTime;
264  static constexpr Index SizeAtCompileTime = Indices::SizeAtCompileTime;
265  static constexpr Index IncrAtCompileTime = Indices::IncrAtCompileTime;
266 
267  static constexpr Index first(const Indices& indices) { return indices.first(); }
268  static constexpr Index size(const Indices& /*indices*/) { return SizeAtCompileTime; }
269  static constexpr Index incr(const Indices& /*indices*/) { return IncrAtCompileTime; }
270 };
271 
272 //--------------------------------------------------------------------------------
273 // Handling of all
274 //--------------------------------------------------------------------------------
275 
276 // Convert a symbolic 'all' into a usable range type
277 template <Index SizeAtCompileTime_>
278 class AllRange {
279  public:
280  static constexpr Index FirstAtCompileTime = Index(0);
281  static constexpr Index SizeAtCompileTime = SizeAtCompileTime_;
282  static constexpr Index IncrAtCompileTime = Index(1);
283  constexpr AllRange(Index size) : size_(size) {}
284  constexpr Index operator[](Index i) const noexcept { return i; }
285  constexpr Index first() const noexcept { return FirstAtCompileTime; }
286  constexpr Index size() const noexcept { return size_.value(); }
287  constexpr Index incr() const noexcept { return IncrAtCompileTime; }
288 
289  private:
291 };
292 
293 template <int NestedSizeAtCompileTime>
294 struct IndexedViewHelperIndicesWrapper<all_t, NestedSizeAtCompileTime, void> {
295  using type = AllRange<Index(NestedSizeAtCompileTime)>;
296  static type CreateIndexSequence(const all_t& /*indices*/, Index nested_size) { return type(nested_size); }
297 };
298 
299 template <Index SizeAtCompileTime_>
300 struct IndexedViewHelper<AllRange<SizeAtCompileTime_>, void> {
302  static constexpr Index FirstAtCompileTime = Indices::FirstAtCompileTime;
303  static constexpr Index SizeAtCompileTime = Indices::SizeAtCompileTime;
304  static constexpr Index IncrAtCompileTime = Indices::IncrAtCompileTime;
305 
306  static Index first(const Indices& indices) { return indices.first(); }
307  static Index size(const Indices& indices) { return indices.size(); }
308  static Index incr(const Indices& indices) { return indices.incr(); }
309 };
310 
311 // this helper class assumes internal::valid_indexed_view_overload<RowIndices, ColIndices>::value == true
312 template <typename Derived, typename RowIndices, typename ColIndices, typename EnableIf = void>
314 
315 template <typename Indices, int SizeAtCompileTime>
317 
318 template <int SizeAtCompileTime, typename Indices>
319 inline IvcType<Indices, SizeAtCompileTime> CreateIndexSequence(size_t size, const Indices& indices) {
321 }
322 
323 // Generic
324 template <typename Derived, typename RowIndices, typename ColIndices>
325 struct IndexedViewSelector<Derived, RowIndices, ColIndices,
326  std::enable_if_t<internal::traits<
327  IndexedView<Derived, IvcType<RowIndices, Derived::RowsAtCompileTime>,
328  IvcType<ColIndices, Derived::ColsAtCompileTime>>>::ReturnAsIndexedView>> {
333 
334  static inline ReturnType run(Derived& derived, const RowIndices& rowIndices, const ColIndices& colIndices) {
335  return ReturnType(derived, CreateIndexSequence<Derived::RowsAtCompileTime>(derived.rows(), rowIndices),
336  CreateIndexSequence<Derived::ColsAtCompileTime>(derived.cols(), colIndices));
337  }
338  static inline ConstReturnType run(const Derived& derived, const RowIndices& rowIndices,
339  const ColIndices& colIndices) {
340  return ConstReturnType(derived, CreateIndexSequence<Derived::RowsAtCompileTime>(derived.rows(), rowIndices),
341  CreateIndexSequence<Derived::ColsAtCompileTime>(derived.cols(), colIndices));
342  }
343 };
344 
345 // Block
346 template <typename Derived, typename RowIndices, typename ColIndices>
348  Derived, RowIndices, ColIndices,
349  std::enable_if_t<internal::traits<IndexedView<Derived, IvcType<RowIndices, Derived::RowsAtCompileTime>,
350  IvcType<ColIndices, Derived::ColsAtCompileTime>>>::ReturnAsBlock>> {
359 
360  static inline ReturnType run(Derived& derived, const RowIndices& rowIndices, const ColIndices& colIndices) {
361  auto actualRowIndices = CreateIndexSequence<Derived::RowsAtCompileTime>(derived.rows(), rowIndices);
362  auto actualColIndices = CreateIndexSequence<Derived::ColsAtCompileTime>(derived.cols(), colIndices);
363  return ReturnType(derived, RowHelper::first(actualRowIndices), ColHelper::first(actualColIndices),
364  RowHelper::size(actualRowIndices), ColHelper::size(actualColIndices));
365  }
366  static inline ConstReturnType run(const Derived& derived, const RowIndices& rowIndices,
367  const ColIndices& colIndices) {
368  auto actualRowIndices = CreateIndexSequence<Derived::RowsAtCompileTime>(derived.rows(), rowIndices);
369  auto actualColIndices = CreateIndexSequence<Derived::ColsAtCompileTime>(derived.cols(), colIndices);
370  return ConstReturnType(derived, RowHelper::first(actualRowIndices), ColHelper::first(actualColIndices),
371  RowHelper::size(actualRowIndices), ColHelper::size(actualColIndices));
372  }
373 };
374 
375 // Scalar
376 template <typename Derived, typename RowIndices, typename ColIndices>
378  Derived, RowIndices, ColIndices,
379  std::enable_if_t<internal::traits<IndexedView<Derived, IvcType<RowIndices, Derived::RowsAtCompileTime>,
380  IvcType<ColIndices, Derived::ColsAtCompileTime>>>::ReturnAsScalar>> {
387  static inline ReturnType run(Derived& derived, const RowIndices& rowIndices, const ColIndices& colIndices) {
388  auto actualRowIndices = CreateIndexSequence<Derived::RowsAtCompileTime>(derived.rows(), rowIndices);
389  auto actualColIndices = CreateIndexSequence<Derived::ColsAtCompileTime>(derived.cols(), colIndices);
390  return derived(RowHelper::first(actualRowIndices), ColHelper::first(actualColIndices));
391  }
392  static inline ConstReturnType run(const Derived& derived, const RowIndices& rowIndices,
393  const ColIndices& colIndices) {
394  auto actualRowIndices = CreateIndexSequence<Derived::RowsAtCompileTime>(derived.rows(), rowIndices);
395  auto actualColIndices = CreateIndexSequence<Derived::ColsAtCompileTime>(derived.cols(), colIndices);
396  return derived(RowHelper::first(actualRowIndices), ColHelper::first(actualColIndices));
397  }
398 };
399 
400 // this helper class assumes internal::is_valid_index_type<Indices>::value == false
401 template <typename Derived, typename Indices, typename EnableIf = void>
403 
404 // Generic
405 template <typename Derived, typename Indices>
407  Derived, Indices,
408  std::enable_if_t<!internal::is_single_range<IvcType<Indices, Derived::SizeAtCompileTime>>::value &&
409  internal::IndexedViewHelper<IvcType<Indices, Derived::SizeAtCompileTime>>::IncrAtCompileTime !=
410  1>> {
411  static constexpr bool IsRowMajor = DenseBase<Derived>::IsRowMajor;
415 
418 
422 
423  template <bool UseRowMajor = IsRowMajor, std::enable_if_t<UseRowMajor, bool> = true>
424  static inline RowMajorReturnType run(Derived& derived, const Indices& indices) {
425  return RowMajorReturnType(derived, ZeroIndex(0),
426  CreateIndexSequence<Derived::ColsAtCompileTime>(derived.cols(), indices));
427  }
428  template <bool UseRowMajor = IsRowMajor, std::enable_if_t<UseRowMajor, bool> = true>
429  static inline ConstRowMajorReturnType run(const Derived& derived, const Indices& indices) {
430  return ConstRowMajorReturnType(derived, ZeroIndex(0),
431  CreateIndexSequence<Derived::ColsAtCompileTime>(derived.cols(), indices));
432  }
433  template <bool UseRowMajor = IsRowMajor, std::enable_if_t<!UseRowMajor, bool> = true>
434  static inline ColMajorReturnType run(Derived& derived, const Indices& indices) {
435  return ColMajorReturnType(derived, CreateIndexSequence<Derived::RowsAtCompileTime>(derived.rows(), indices),
436  ZeroIndex(0));
437  }
438  template <bool UseRowMajor = IsRowMajor, std::enable_if_t<!UseRowMajor, bool> = true>
439  static inline ConstColMajorReturnType run(const Derived& derived, const Indices& indices) {
440  return ConstColMajorReturnType(derived, CreateIndexSequence<Derived::RowsAtCompileTime>(derived.rows(), indices),
441  ZeroIndex(0));
442  }
443 };
444 
445 // Block
446 template <typename Derived, typename Indices>
448  Derived, Indices,
449  std::enable_if_t<!internal::is_single_range<IvcType<Indices, Derived::SizeAtCompileTime>>::value &&
450  internal::IndexedViewHelper<IvcType<Indices, Derived::SizeAtCompileTime>>::IncrAtCompileTime ==
451  1>> {
455  static inline ReturnType run(Derived& derived, const Indices& indices) {
456  auto actualIndices = CreateIndexSequence<Derived::SizeAtCompileTime>(derived.size(), indices);
457  return ReturnType(derived, Helper::first(actualIndices), Helper::size(actualIndices));
458  }
459  static inline ConstReturnType run(const Derived& derived, const Indices& indices) {
460  auto actualIndices = CreateIndexSequence<Derived::SizeAtCompileTime>(derived.size(), indices);
461  return ConstReturnType(derived, Helper::first(actualIndices), Helper::size(actualIndices));
462  }
463 };
464 
465 // Symbolic
466 template <typename Derived, typename Indices>
468  Derived, Indices,
469  std::enable_if_t<internal::is_single_range<IvcType<Indices, Derived::SizeAtCompileTime>>::value>> {
473  static inline ReturnType run(Derived& derived, const Indices& indices) {
474  auto actualIndices = CreateIndexSequence<Derived::SizeAtCompileTime>(derived.size(), indices);
475  return derived(Helper::first(actualIndices));
476  }
477  static inline ConstReturnType run(const Derived& derived, const Indices& indices) {
478  auto actualIndices = CreateIndexSequence<Derived::SizeAtCompileTime>(derived.size(), indices);
479  return derived(Helper::first(actualIndices));
480  }
481 };
482 
483 } // end namespace internal
484 
485 } // end namespace Eigen
486 
487 #endif // EIGEN_INDEXED_VIEW_HELPER_H
Array< int, Dynamic, 1 > v
Definition: Array_initializer_list_vector_cxx11.cpp:1
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Scalar Scalar int size
Definition: benchVecAdd.cpp:17
Definition: ArithmeticSequence.h:62
constexpr const IncrType & incrObject() const
Definition: ArithmeticSequence.h:85
constexpr const FirstType & firstObject() const
Definition: ArithmeticSequence.h:83
constexpr const SizeType & sizeObject() const
Definition: ArithmeticSequence.h:84
Base class for all dense matrices, vectors, and arrays.
Definition: DenseBase.h:44
Base::CoeffReturnType CoeffReturnType
Definition: DenseBase.h:92
internal::traits< Derived >::Scalar Scalar
Definition: DenseBase.h:62
Expression of a non-sequential sub-matrix defined by arbitrary sequences of row and column indices.
Definition: IndexedView.h:124
Expression of a fixed-size or dynamic-size sub-vector.
Definition: VectorBlock.h:58
Definition: IndexedViewHelper.h:278
constexpr Index incr() const noexcept
Definition: IndexedViewHelper.h:287
constexpr AllRange(Index size)
Definition: IndexedViewHelper.h:283
constexpr Index operator[](Index i) const noexcept
Definition: IndexedViewHelper.h:284
static constexpr Index FirstAtCompileTime
Definition: IndexedViewHelper.h:280
constexpr Index first() const noexcept
Definition: IndexedViewHelper.h:285
static constexpr Index SizeAtCompileTime
Definition: IndexedViewHelper.h:281
constexpr Index size() const noexcept
Definition: IndexedViewHelper.h:286
variable_if_dynamic< Index, int(SizeAtCompileTime)> size_
Definition: IndexedViewHelper.h:290
static constexpr Index IncrAtCompileTime
Definition: IndexedViewHelper.h:282
Definition: IndexedViewHelper.h:152
constexpr Index first() const noexcept
Definition: IndexedViewHelper.h:160
constexpr Index operator[](Index i) const
Definition: IndexedViewHelper.h:159
static constexpr Index FirstAtCompileTime
Definition: IndexedViewHelper.h:154
constexpr Index incr() const noexcept
Definition: IndexedViewHelper.h:162
constexpr ArithmeticSequenceRange(Index first, Index size, Index incr)
Definition: IndexedViewHelper.h:158
variable_if_dynamic< Index, int(SizeAtCompileTime)> size_
Definition: IndexedViewHelper.h:166
variable_if_dynamicindex< Index, int(FirstAtCompileTime)> first_
Definition: IndexedViewHelper.h:165
static constexpr Index SizeAtCompileTime
Definition: IndexedViewHelper.h:155
static constexpr Index IncrAtCompileTime
Definition: IndexedViewHelper.h:156
variable_if_dynamicindex< Index, int(IncrAtCompileTime)> incr_
Definition: IndexedViewHelper.h:167
constexpr Index size() const noexcept
Definition: IndexedViewHelper.h:161
Definition: IntegralConstant.h:23
Definition: IndexedViewHelper.h:218
variable_if_dynamicindex< Index, int(ValueAtCompileTime)> value_
Definition: IndexedViewHelper.h:231
static constexpr Index IncrAtCompileTime
Definition: IndexedViewHelper.h:222
constexpr SingleRange(Index v) noexcept
Definition: IndexedViewHelper.h:224
static constexpr Index SizeAtCompileTime
Definition: IndexedViewHelper.h:221
constexpr Index operator[](Index) const noexcept
Definition: IndexedViewHelper.h:225
constexpr Index first() const noexcept
Definition: IndexedViewHelper.h:226
constexpr Index size() const noexcept
Definition: IndexedViewHelper.h:227
constexpr Index incr() const noexcept
Definition: IndexedViewHelper.h:228
static constexpr Index FirstAtCompileTime
Definition: IndexedViewHelper.h:220
Definition: XprHelper.h:154
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR T value()
Definition: XprHelper.h:161
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR T value()
Definition: XprHelper.h:189
Definition: SymbolicIndex.h:373
Definition: SymbolicIndex.h:320
Definition: SymbolicIndex.h:188
@ N
Definition: constructor.cpp:22
static constexpr lastp1_t end
Definition: IndexedViewHelper.h:79
static constexpr Eigen::internal::all_t all
Definition: IndexedViewHelper.h:86
static constexpr const last_t last
Definition: IndexedViewHelper.h:48
static constexpr lastp1_t lastp1
Definition: IndexedViewHelper.h:72
return int(ret)+1
IvcType< Indices, SizeAtCompileTime > CreateIndexSequence(size_t size, const Indices &indices)
Definition: IndexedViewHelper.h:319
typename internal::IndexedViewHelperIndicesWrapper< Indices, SizeAtCompileTime >::type IvcType
Definition: IndexedViewHelper.h:316
EIGEN_CONSTEXPR auto index_list_size(const T &x)
Definition: Meta.h:344
symbolic::AddExpr< symbolic::SymbolExpr< internal::symbolic_last_tag >, symbolic::ValueExpr< Eigen::internal::FixedInt< 1 > > > lastp1_t
Definition: IndexedViewHelper.h:52
symbolic::SymbolExpr< internal::symbolic_last_tag > last_t
Definition: IndexedViewHelper.h:27
Eigen::internal::all_t all_t
Definition: IndexedViewHelper.h:53
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:70
const int Undefined
Definition: Constants.h:34
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
const int DynamicIndex
Definition: Constants.h:30
const int Dynamic
Definition: Constants.h:25
type
Definition: compute_granudrum_aor.py:141
Definition: Eigen_Colamd.h:49
unsigned SizeType
Use 32-bit array/string indices even for 64-bit platform, instead of using size_t.
Definition: rapidjson.h:67
static type CreateIndexSequence(const Indices &indices, Index nested_size)
Definition: IndexedViewHelper.h:190
static type CreateIndexSequence(const FixedInt< N > &)
Definition: IndexedViewHelper.h:257
static type CreateIndexSequence(const all_t &, Index nested_size)
Definition: IndexedViewHelper.h:296
Definition: IndexedViewHelper.h:130
static const type & CreateIndexSequence(const Indices &indices, Index)
Definition: IndexedViewHelper.h:132
Indices type
Definition: IndexedViewHelper.h:131
static Index incr(const Indices &indices)
Definition: IndexedViewHelper.h:308
static Index first(const Indices &indices)
Definition: IndexedViewHelper.h:306
static Index size(const Indices &indices)
Definition: IndexedViewHelper.h:307
static constexpr Index incr(const Indices &)
Definition: IndexedViewHelper.h:269
static constexpr Index first(const Indices &indices)
Definition: IndexedViewHelper.h:267
static constexpr Index size(const Indices &)
Definition: IndexedViewHelper.h:268
Definition: IndexedViewHelper.h:137
static constexpr Index SizeAtCompileTime
Definition: IndexedViewHelper.h:139
static constexpr Index incr(const Indices &)
Definition: IndexedViewHelper.h:144
static constexpr Index FirstAtCompileTime
Definition: IndexedViewHelper.h:138
static constexpr Index first(const Indices &indices)
Definition: IndexedViewHelper.h:142
static constexpr Index IncrAtCompileTime
Definition: IndexedViewHelper.h:140
static constexpr Index size(const Indices &indices)
Definition: IndexedViewHelper.h:143
Definition: IndexedViewHelper.h:313
static Index eval(const FixedInt< N > &, Index)
Definition: IndexedViewHelper.h:121
Definition: IndexedViewHelper.h:95
static Index eval(const Expr &expr, Index)
Definition: IndexedViewHelper.h:97
static constexpr Index ValueAtCompileTime
Definition: IndexedViewHelper.h:96
Definition: IndexedViewHelper.h:402
Definition: IndexedViewHelper.h:21
Definition: Meta.h:305
Definition: IndexedViewHelper.h:235
Definition: IndexedViewHelper.h:19
Definition: ForwardDeclarations.h:21