DenseStorage.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) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>
5 // Copyright (C) 2006-2009 Benoit Jacob <jacob.benoit.1@gmail.com>
6 // Copyright (C) 2010-2013 Hauke Heibel <hauke.heibel@gmail.com>
7 //
8 // This Source Code Form is subject to the terms of the Mozilla
9 // Public License v. 2.0. If a copy of the MPL was not distributed
10 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
11 
12 #ifndef EIGEN_MATRIXSTORAGE_H
13 #define EIGEN_MATRIXSTORAGE_H
14 
15 #ifdef EIGEN_DENSE_STORAGE_CTOR_PLUGIN
16 #define EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN(X) \
17  X; \
18  EIGEN_DENSE_STORAGE_CTOR_PLUGIN;
19 #else
20 #define EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN(X)
21 #endif
22 
23 // IWYU pragma: private
24 #include "./InternalHeaderCheck.h"
25 
26 namespace Eigen {
27 
28 namespace internal {
29 
30 #if defined(EIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT)
31 #define EIGEN_MAKE_UNALIGNED_ARRAY_ASSERT(Alignment)
32 #else
33 #define EIGEN_MAKE_UNALIGNED_ARRAY_ASSERT(Alignment) \
34  eigen_assert((is_constant_evaluated() || (std::uintptr_t(array) % Alignment == 0)) && \
35  "this assertion is explained here: " \
36  "http://eigen.tuxfamily.org/dox-devel/group__TopicUnalignedArrayAssert.html" \
37  " **** READ THIS WEB PAGE !!! ****");
38 #endif
39 
40 #if EIGEN_STACK_ALLOCATION_LIMIT
41 #define EIGEN_MAKE_STACK_ALLOCATION_ASSERT(X) \
42  EIGEN_STATIC_ASSERT(X <= EIGEN_STACK_ALLOCATION_LIMIT, OBJECT_ALLOCATED_ON_STACK_IS_TOO_BIG)
43 #else
44 #define EIGEN_MAKE_STACK_ALLOCATION_ASSERT(X)
45 #endif
46 
52 template <typename T, int Size, int MatrixOrArrayOptions,
53  int Alignment = (MatrixOrArrayOptions & DontAlign) ? 0 : compute_default_alignment<T, Size>::value>
54 struct plain_array {
55  EIGEN_ALIGN_TO_BOUNDARY(Alignment) T array[Size];
56 #if defined(EIGEN_NO_DEBUG) || defined(EIGEN_TESTING_PLAINOBJECT_CTOR)
58 #else
62  }
63 #endif
64 };
65 
66 template <typename T, int Size, int MatrixOrArrayOptions>
68  T array[Size];
69 #if defined(EIGEN_NO_DEBUG) || defined(EIGEN_TESTING_PLAINOBJECT_CTOR)
71 #else
73 #endif
74 };
75 
76 template <typename T, int MatrixOrArrayOptions, int Alignment>
78  T array[1];
80 };
81 
82 template <typename T, int Size, int Options, int Alignment>
85  Index a_size, Index b_size) {
86  Index common_size = numext::mini(a_size, b_size);
87  std::swap_ranges(a.array, a.array + common_size, b.array);
88  if (a_size > b_size)
89  smart_copy(a.array + common_size, a.array + a_size, b.array + common_size);
90  else if (b_size > a_size)
91  smart_copy(b.array + common_size, b.array + b_size, a.array + common_size);
92 }
93 
94 template <typename T, int Size, int Rows, int Cols, int Options>
97 
98  public:
99 #ifndef EIGEN_DENSE_STORAGE_CTOR_PLUGIN
102 #else
105  }
108  smart_copy(other.m_data.array, other.m_data.array + Size, m_data.array);
109  }
110 #endif
111  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr DenseStorage_impl(Index /*size*/, Index /*rows*/, Index /*cols*/) {}
114  numext::swap(m_data, other.m_data);
115  }
117  Index /*cols*/) {}
118  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr void resize(Index /*size*/, Index /*rows*/, Index /*cols*/) {}
119  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index rows() const { return Rows; }
120  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index cols() const { return Cols; }
121  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index size() const { return Rows * Cols; }
122  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr T* data() { return m_data.array; }
123  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr const T* data() const { return m_data.array; }
124 };
125 template <typename T, int Size, int Cols, int Options>
128  Index m_rows = 0;
129 
130  public:
133  : m_rows(other.m_rows) {
135  smart_copy(other.m_data.array, other.m_data.array + other.size(), m_data.array);
136  }
138  : m_rows(rows) {
141  }
143  smart_copy(other.m_data.array, other.m_data.array + other.size(), m_data.array);
144  m_rows = other.m_rows;
145  return *this;
146  }
148  swap_plain_array(m_data, other.m_data, size(), other.size());
149  numext::swap(m_rows, other.m_rows);
150  }
152  m_rows = rows;
153  }
154  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr void resize(Index /*size*/, Index rows, Index /*cols*/) {
155  m_rows = rows;
156  }
157  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index rows() const { return m_rows; }
158  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index cols() const { return Cols; }
159  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index size() const { return m_rows * Cols; }
160  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr T* data() { return m_data.array; }
161  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr const T* data() const { return m_data.array; }
162 };
163 template <typename T, int Size, int Rows, int Options>
166  Index m_cols = 0;
167 
168  public:
171  : m_cols(other.m_cols) {
173  smart_copy(other.m_data.array, other.m_data.array + other.size(), m_data.array);
174  }
176  : m_cols(cols) {
179  }
181  smart_copy(other.m_data.array, other.m_data.array + other.size(), m_data.array);
182  m_cols = other.m_cols;
183  return *this;
184  }
186  swap_plain_array(m_data, other.m_data, size(), other.size());
187  numext::swap(m_cols, other.m_cols);
188  }
190  m_cols = cols;
191  }
192  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr void resize(Index /*size*/, Index /*rows*/, Index cols) {
193  m_cols = cols;
194  }
195  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index rows() const { return Rows; }
196  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index cols() const { return m_cols; }
197  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index size() const { return Rows * m_cols; }
198  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr T* data() { return m_data.array; }
199  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr const T* data() const { return m_data.array; }
200 };
201 template <typename T, int Size, int Options>
204  Index m_rows = 0;
205  Index m_cols = 0;
206 
207  public:
210  : m_rows(other.m_rows), m_cols(other.m_cols) {
212  smart_copy(other.m_data.array, other.m_data.array + other.size(), m_data.array);
213  }
215  : m_rows(rows), m_cols(cols) {
218  }
220  smart_copy(other.m_data.array, other.m_data.array + other.size(), m_data.array);
221  m_rows = other.m_rows;
222  m_cols = other.m_cols;
223  return *this;
224  }
226  swap_plain_array(m_data, other.m_data, size(), other.size());
227  numext::swap(m_rows, other.m_rows);
228  numext::swap(m_cols, other.m_cols);
229  }
231  m_rows = rows;
232  m_cols = cols;
233  }
235  m_rows = rows;
236  m_cols = cols;
237  }
238  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index rows() const { return m_rows; }
239  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index cols() const { return m_cols; }
240  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index size() const { return m_rows * m_cols; }
241  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr T* data() { return m_data.array; }
242  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr const T* data() const { return m_data.array; }
243 };
244 // null matrix variants
245 template <typename T, int Rows, int Cols, int Options>
247  public:
250  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr DenseStorage_impl(Index /*size*/, Index /*rows*/, Index /*cols*/) {}
254  Index /*cols*/) {}
255  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr void resize(Index /*size*/, Index /*rows*/, Index /*cols*/) {}
256  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index rows() const { return Rows; }
257  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index cols() const { return Cols; }
258  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index size() const { return Rows * Cols; }
259  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr T* data() { return nullptr; }
260  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr const T* data() const { return nullptr; }
261 };
262 template <typename T, int Cols, int Options>
264  Index m_rows = 0;
265 
266  public:
270  : m_rows(rows) {}
273  numext::swap(m_rows, other.m_rows);
274  }
276  m_rows = rows;
277  }
278  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr void resize(Index /*size*/, Index rows, Index /*cols*/) {
279  m_rows = rows;
280  }
281  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index rows() const { return m_rows; }
282  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index cols() const { return Cols; }
283  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index size() const { return m_rows * Cols; }
284  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr T* data() { return nullptr; }
285  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr const T* data() const { return nullptr; }
286 };
287 template <typename T, int Rows, int Options>
289  Index m_cols = 0;
290 
291  public:
295  : m_cols(cols) {}
298  numext::swap(m_cols, other.m_cols);
299  }
301  m_cols = cols;
302  }
303  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr void resize(Index /*size*/, Index /*rows*/, Index cols) {
304  m_cols = cols;
305  }
306  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index rows() const { return Rows; }
307  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index cols() const { return m_cols; }
308  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index size() const { return Rows * m_cols; }
309  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr T* data() { return nullptr; }
310  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr const T* data() const { return nullptr; }
311 };
312 template <typename T, int Options>
314  Index m_rows = 0;
315  Index m_cols = 0;
316 
317  public:
321  : m_rows(rows), m_cols(cols) {}
324  numext::swap(m_rows, other.m_rows);
325  numext::swap(m_cols, other.m_cols);
326  }
328  m_rows = rows;
329  m_cols = cols;
330  }
332  m_rows = rows;
333  m_cols = cols;
334  }
335  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index rows() const { return m_rows; }
336  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index cols() const { return m_cols; }
337  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index size() const { return m_rows * m_cols; }
338  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr T* data() { return nullptr; }
339  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr const T* data() const { return nullptr; }
340 };
341 // fixed-size matrix with dynamic memory allocation not currently supported
342 template <typename T, int Rows, int Cols, int Options>
344 // dynamic-sized variants
345 template <typename T, int Cols, int Options>
347  static constexpr bool Align = (Options & DontAlign) == 0;
348  T* m_data = nullptr;
349  Index m_rows = 0;
350 
351  public:
352  static constexpr int Size = Dynamic;
355  : m_data(conditional_aligned_new_auto<T, Align>(other.size())), m_rows(other.m_rows) {
357  smart_copy(other.m_data, other.m_data + other.size(), m_data);
358  }
360  : m_data(conditional_aligned_new_auto<T, Align>(size)), m_rows(rows) {
362  }
364  : m_data(other.m_data), m_rows(other.m_rows) {
365  other.m_data = nullptr;
366  other.m_rows = 0;
367  }
368  EIGEN_DEVICE_FUNC ~DenseStorage_impl() { conditional_aligned_delete_auto<T, Align>(m_data, size()); }
370  resize(other.size(), other.rows(), other.cols());
371  smart_copy(other.m_data, other.m_data + other.size(), m_data);
372  return *this;
373  }
375  this->swap(other);
376  return *this;
377  }
379  numext::swap(m_data, other.m_data);
380  numext::swap(m_rows, other.m_rows);
381  }
383  m_data = conditional_aligned_realloc_new_auto<T, Align>(m_data, size, this->size());
384  m_rows = rows;
385  }
387  Index oldSize = this->size();
388  if (oldSize != size) {
389  conditional_aligned_delete_auto<T, Align>(m_data, oldSize);
390  m_data = conditional_aligned_new_auto<T, Align>(size);
392  }
393  m_rows = rows;
394  }
395  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index rows() const { return m_rows; }
396  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index cols() const { return Cols; }
397  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index size() const { return m_rows * Cols; }
398  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr T* data() { return m_data; }
399  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr const T* data() const { return m_data; }
400 };
401 template <typename T, int Rows, int Options>
403  static constexpr bool Align = (Options & DontAlign) == 0;
404  T* m_data = nullptr;
405  Index m_cols = 0;
406 
407  public:
408  static constexpr int Size = Dynamic;
411  : m_data(conditional_aligned_new_auto<T, Align>(other.size())), m_cols(other.m_cols) {
413  smart_copy(other.m_data, other.m_data + other.size(), m_data);
414  }
416  : m_data(conditional_aligned_new_auto<T, Align>(size)), m_cols(cols) {
418  }
420  : m_data(other.m_data), m_cols(other.m_cols) {
421  other.m_data = nullptr;
422  other.m_cols = 0;
423  }
424  EIGEN_DEVICE_FUNC ~DenseStorage_impl() { conditional_aligned_delete_auto<T, Align>(m_data, size()); }
426  resize(other.size(), other.rows(), other.cols());
427  smart_copy(other.m_data, other.m_data + other.size(), m_data);
428  return *this;
429  }
431  this->swap(other);
432  return *this;
433  }
435  numext::swap(m_data, other.m_data);
436  numext::swap(m_cols, other.m_cols);
437  }
439  m_data = conditional_aligned_realloc_new_auto<T, Align>(m_data, size, this->size());
440  m_cols = cols;
441  }
443  Index oldSize = this->size();
444  if (oldSize != size) {
445  conditional_aligned_delete_auto<T, Align>(m_data, oldSize);
446  m_data = conditional_aligned_new_auto<T, Align>(size);
448  }
449  m_cols = cols;
450  }
451  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index rows() const { return Rows; }
452  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index cols() const { return m_cols; }
453  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index size() const { return Rows * m_cols; }
454  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr T* data() { return m_data; }
455  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr const T* data() const { return m_data; }
456 };
457 template <typename T, int Options>
459  static constexpr bool Align = (Options & DontAlign) == 0;
460  T* m_data = nullptr;
461  Index m_rows = 0;
462  Index m_cols = 0;
463 
464  public:
465  static constexpr int Size = Dynamic;
468  : m_data(conditional_aligned_new_auto<T, Align>(other.size())), m_rows(other.m_rows), m_cols(other.m_cols) {
470  smart_copy(other.m_data, other.m_data + other.size(), m_data);
471  }
473  : m_data(conditional_aligned_new_auto<T, Align>(size)), m_rows(rows), m_cols(cols) {
475  }
477  : m_data(other.m_data), m_rows(other.m_rows), m_cols(other.m_cols) {
478  other.m_data = nullptr;
479  other.m_rows = 0;
480  other.m_cols = 0;
481  }
482  EIGEN_DEVICE_FUNC ~DenseStorage_impl() { conditional_aligned_delete_auto<T, Align>(m_data, size()); }
484  resize(other.size(), other.rows(), other.cols());
485  smart_copy(other.m_data, other.m_data + other.size(), m_data);
486  return *this;
487  }
489  this->swap(other);
490  return *this;
491  }
493  numext::swap(m_data, other.m_data);
494  numext::swap(m_rows, other.m_rows);
495  numext::swap(m_cols, other.m_cols);
496  }
498  m_data = conditional_aligned_realloc_new_auto<T, Align>(m_data, size, this->size());
499  m_rows = rows;
500  m_cols = cols;
501  }
503  Index oldSize = this->size();
504  if (oldSize != size) {
505  conditional_aligned_delete_auto<T, Align>(m_data, oldSize);
506  m_data = conditional_aligned_new_auto<T, Align>(size);
508  }
509  m_rows = rows;
510  m_cols = cols;
511  }
512  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index rows() const { return m_rows; }
513  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index cols() const { return m_cols; }
514  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr Index size() const { return m_rows * m_cols; }
515  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr T* data() { return m_data; }
516  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE constexpr const T* data() const { return m_data; }
517 };
518 template <typename T, int Size, int Rows, int Cols>
520  static constexpr bool DynamicObject = Size == Dynamic;
521  static constexpr bool TrivialObject =
522  (!NumTraits<T>::RequireInitialization) && (Rows >= 0) && (Cols >= 0) && (Size == Rows * Cols);
523  static constexpr bool value = DynamicObject || TrivialObject;
524 };
525 } // end namespace internal
526 
539 template <typename T, int Size, int Rows, int Cols, int Options,
541 class DenseStorage : public internal::DenseStorage_impl<T, Size, Rows, Cols, Options> {
543 
544  public:
548  : Base(size, rows, cols) {}
550  // if DenseStorage meets the requirements of use_default_move, then use the move construction and move assignment
551  // operation defined in DenseStorage_impl, or the compiler-generated version if none is defined
554 };
555 template <typename T, int Size, int Rows, int Cols, int Options>
556 class DenseStorage<T, Size, Rows, Cols, Options, false>
557  : public internal::DenseStorage_impl<T, Size, Rows, Cols, Options> {
559 
560  public:
564  : Base(size, rows, cols) {}
566  // if DenseStorage does not meet the requirements of use_default_move, then defer to the copy construction and copy
567  // assignment behavior
569  : DenseStorage(static_cast<const DenseStorage&>(other)) {}
571  *this = other;
572  return *this;
573  }
574 };
575 
576 } // end namespace Eigen
577 
578 #endif // EIGEN_MATRIX_H
#define EIGEN_MAKE_STACK_ALLOCATION_ASSERT(X)
Definition: DenseStorage.h:44
#define EIGEN_MAKE_UNALIGNED_ARRAY_ASSERT(Alignment)
Definition: DenseStorage.h:33
#define EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN(X)
Definition: DenseStorage.h:20
Eigen::Triplet< double > T
Definition: EigenUnitTest.cpp:11
#define EIGEN_UNUSED_VARIABLE(var)
Definition: Macros.h:966
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:892
#define EIGEN_STRONG_INLINE
Definition: Macros.h:834
v resize(3)
int rows
Definition: Tutorial_commainit_02.cpp:1
int cols
Definition: Tutorial_commainit_02.cpp:1
Scalar Scalar int size
Definition: benchVecAdd.cpp:17
Scalar * b
Definition: benchVecAdd.cpp:17
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage & operator=(const DenseStorage &)=default
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage & operator=(DenseStorage &&other)
Definition: DenseStorage.h:570
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage()=default
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage(const DenseStorage &)=default
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage(Index size, Index rows, Index cols)
Definition: DenseStorage.h:563
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage(DenseStorage &&other)
Definition: DenseStorage.h:568
Definition: DenseStorage.h:541
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage()=default
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage & operator=(DenseStorage &&)=default
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage & operator=(const DenseStorage &)=default
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage(Index size, Index rows, Index cols)
Definition: DenseStorage.h:547
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage(DenseStorage &&)=default
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage(const DenseStorage &)=default
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void conservativeResize(Index, Index rows, Index)
Definition: DenseStorage.h:275
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index cols() const
Definition: DenseStorage.h:282
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void resize(Index, Index rows, Index)
Definition: DenseStorage.h:278
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE const T * data() const
Definition: DenseStorage.h:285
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl(Index, Index rows, Index)
Definition: DenseStorage.h:269
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl(const DenseStorage_impl &)=default
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index size() const
Definition: DenseStorage.h:283
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl()=default
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE T * data()
Definition: DenseStorage.h:284
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl & operator=(const DenseStorage_impl &)=default
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index rows() const
Definition: DenseStorage.h:281
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void swap(DenseStorage_impl &other) noexcept
Definition: DenseStorage.h:272
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl(Index, Index rows, Index cols)
Definition: DenseStorage.h:320
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl()=default
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index rows() const
Definition: DenseStorage.h:335
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl(const DenseStorage_impl &)=default
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void resize(Index, Index rows, Index cols)
Definition: DenseStorage.h:331
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void conservativeResize(Index, Index rows, Index cols)
Definition: DenseStorage.h:327
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index cols() const
Definition: DenseStorage.h:336
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl & operator=(const DenseStorage_impl &)=default
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index size() const
Definition: DenseStorage.h:337
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void swap(DenseStorage_impl &other) noexcept
Definition: DenseStorage.h:323
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE T * data()
Definition: DenseStorage.h:338
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE const T * data() const
Definition: DenseStorage.h:339
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index rows() const
Definition: DenseStorage.h:256
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void conservativeResize(Index, Index, Index)
Definition: DenseStorage.h:253
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE const T * data() const
Definition: DenseStorage.h:260
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl(Index, Index, Index)
Definition: DenseStorage.h:250
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void swap(DenseStorage_impl &)
Definition: DenseStorage.h:252
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl()=default
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl(const DenseStorage_impl &)=default
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void resize(Index, Index, Index)
Definition: DenseStorage.h:255
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl & operator=(const DenseStorage_impl &)=default
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index size() const
Definition: DenseStorage.h:258
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE T * data()
Definition: DenseStorage.h:259
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index cols() const
Definition: DenseStorage.h:257
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index size() const
Definition: DenseStorage.h:308
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl(const DenseStorage_impl &)=default
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void swap(DenseStorage_impl &other) noexcept
Definition: DenseStorage.h:297
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index rows() const
Definition: DenseStorage.h:306
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE T * data()
Definition: DenseStorage.h:309
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void resize(Index, Index, Index cols)
Definition: DenseStorage.h:303
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl & operator=(const DenseStorage_impl &)=default
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE const T * data() const
Definition: DenseStorage.h:310
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl()=default
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void conservativeResize(Index, Index, Index cols)
Definition: DenseStorage.h:300
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index cols() const
Definition: DenseStorage.h:307
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl(Index, Index, Index cols)
Definition: DenseStorage.h:294
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl & operator=(const DenseStorage_impl &other)
Definition: DenseStorage.h:369
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl()=default
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index cols() const
Definition: DenseStorage.h:396
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void resize(Index size, Index rows, Index)
Definition: DenseStorage.h:386
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index rows() const
Definition: DenseStorage.h:395
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl & operator=(DenseStorage_impl &&other) noexcept
Definition: DenseStorage.h:374
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl(Index size, Index rows, Index)
Definition: DenseStorage.h:359
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE const T * data() const
Definition: DenseStorage.h:399
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl(DenseStorage_impl &&other) noexcept
Definition: DenseStorage.h:363
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index size() const
Definition: DenseStorage.h:397
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl(const DenseStorage_impl &other)
Definition: DenseStorage.h:354
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void conservativeResize(Index size, Index rows, Index)
Definition: DenseStorage.h:382
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE T * data()
Definition: DenseStorage.h:398
EIGEN_DEVICE_FUNC ~DenseStorage_impl()
Definition: DenseStorage.h:368
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void swap(DenseStorage_impl &other) noexcept
Definition: DenseStorage.h:378
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void swap(DenseStorage_impl &other) noexcept
Definition: DenseStorage.h:492
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void conservativeResize(Index size, Index rows, Index cols)
Definition: DenseStorage.h:497
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE const T * data() const
Definition: DenseStorage.h:516
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl()=default
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl & operator=(DenseStorage_impl &&other) noexcept
Definition: DenseStorage.h:488
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index rows() const
Definition: DenseStorage.h:512
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void resize(Index size, Index rows, Index cols)
Definition: DenseStorage.h:502
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index size() const
Definition: DenseStorage.h:514
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl(Index size, Index rows, Index cols)
Definition: DenseStorage.h:472
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE T * data()
Definition: DenseStorage.h:515
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl(const DenseStorage_impl &other)
Definition: DenseStorage.h:467
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl & operator=(const DenseStorage_impl &other)
Definition: DenseStorage.h:483
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl(DenseStorage_impl &&other) noexcept
Definition: DenseStorage.h:476
EIGEN_DEVICE_FUNC ~DenseStorage_impl()
Definition: DenseStorage.h:482
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index cols() const
Definition: DenseStorage.h:513
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl(const DenseStorage_impl &other)
Definition: DenseStorage.h:410
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl(DenseStorage_impl &&other) noexcept
Definition: DenseStorage.h:419
EIGEN_DEVICE_FUNC ~DenseStorage_impl()
Definition: DenseStorage.h:424
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index rows() const
Definition: DenseStorage.h:451
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index cols() const
Definition: DenseStorage.h:452
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index size() const
Definition: DenseStorage.h:453
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl & operator=(DenseStorage_impl &&other) noexcept
Definition: DenseStorage.h:430
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE const T * data() const
Definition: DenseStorage.h:455
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl(Index size, Index, Index cols)
Definition: DenseStorage.h:415
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void conservativeResize(Index size, Index, Index cols)
Definition: DenseStorage.h:438
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl & operator=(const DenseStorage_impl &other)
Definition: DenseStorage.h:425
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void resize(Index size, Index, Index cols)
Definition: DenseStorage.h:442
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void swap(DenseStorage_impl &other) noexcept
Definition: DenseStorage.h:434
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl()=default
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE T * data()
Definition: DenseStorage.h:454
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl()=default
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void resize(Index, Index rows, Index)
Definition: DenseStorage.h:154
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE T * data()
Definition: DenseStorage.h:160
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl & operator=(const DenseStorage_impl &other)
Definition: DenseStorage.h:142
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void conservativeResize(Index, Index rows, Index)
Definition: DenseStorage.h:151
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index size() const
Definition: DenseStorage.h:159
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl(Index size, Index rows, Index)
Definition: DenseStorage.h:137
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void swap(DenseStorage_impl &other)
Definition: DenseStorage.h:147
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index rows() const
Definition: DenseStorage.h:157
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl(const DenseStorage_impl &other)
Definition: DenseStorage.h:132
plain_array< T, Size, Options > m_data
Definition: DenseStorage.h:127
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index cols() const
Definition: DenseStorage.h:158
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE const T * data() const
Definition: DenseStorage.h:161
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void resize(Index, Index rows, Index cols)
Definition: DenseStorage.h:234
plain_array< T, Size, Options > m_data
Definition: DenseStorage.h:203
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl(const DenseStorage_impl &other)
Definition: DenseStorage.h:209
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void swap(DenseStorage_impl &other)
Definition: DenseStorage.h:225
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE T * data()
Definition: DenseStorage.h:241
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl(Index size, Index rows, Index cols)
Definition: DenseStorage.h:214
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index cols() const
Definition: DenseStorage.h:239
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void conservativeResize(Index, Index rows, Index cols)
Definition: DenseStorage.h:230
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl()=default
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl & operator=(const DenseStorage_impl &other)
Definition: DenseStorage.h:219
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index rows() const
Definition: DenseStorage.h:238
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE const T * data() const
Definition: DenseStorage.h:242
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index size() const
Definition: DenseStorage.h:240
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE T * data()
Definition: DenseStorage.h:198
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl(const DenseStorage_impl &other)
Definition: DenseStorage.h:170
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void resize(Index, Index, Index cols)
Definition: DenseStorage.h:192
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void conservativeResize(Index, Index, Index cols)
Definition: DenseStorage.h:189
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void swap(DenseStorage_impl &other)
Definition: DenseStorage.h:185
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index cols() const
Definition: DenseStorage.h:196
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index size() const
Definition: DenseStorage.h:197
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl()=default
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl & operator=(const DenseStorage_impl &other)
Definition: DenseStorage.h:180
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE const T * data() const
Definition: DenseStorage.h:199
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index rows() const
Definition: DenseStorage.h:195
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl(Index size, Index, Index cols)
Definition: DenseStorage.h:175
plain_array< T, Size, Options > m_data
Definition: DenseStorage.h:165
Definition: DenseStorage.h:95
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl & operator=(const DenseStorage_impl &)=default
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void conservativeResize(Index, Index, Index)
Definition: DenseStorage.h:116
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl()=default
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void swap(DenseStorage_impl &other)
Definition: DenseStorage.h:113
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index cols() const
Definition: DenseStorage.h:120
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl(const DenseStorage_impl &)=default
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index size() const
Definition: DenseStorage.h:121
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void resize(Index, Index, Index)
Definition: DenseStorage.h:118
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Index rows() const
Definition: DenseStorage.h:119
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE const T * data() const
Definition: DenseStorage.h:123
plain_array< T, Size, Options > m_data
Definition: DenseStorage.h:96
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE DenseStorage_impl(Index, Index, Index)
Definition: DenseStorage.h:111
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE T * data()
Definition: DenseStorage.h:122
@ DontAlign
Definition: Constants.h:324
const Scalar * a
Definition: level2_cplx_impl.h:32
EIGEN_DEVICE_FUNC void smart_copy(const T *start, const T *end, T *target)
Definition: Memory.h:569
EIGEN_DEVICE_FUNC T * conditional_aligned_new_auto(std::size_t size)
Definition: Memory.h:476
void swap(scoped_array< T > &a, scoped_array< T > &b)
Definition: Memory.h:734
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void swap_plain_array(plain_array< T, Size, Options, Alignment > &a, plain_array< T, Size, Options, Alignment > &b, Index a_size, Index b_size)
Definition: DenseStorage.h:83
EIGEN_STRONG_INLINE void swap(T &a, T &b)
Definition: Meta.h:536
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T mini(const T &x, const T &y)
Definition: MathFunctions.h:920
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:70
std::array< T, N > array
Definition: EmulateArray.h:231
squared absolute value
Definition: GlobalFunctions.h:87
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
const int Dynamic
Definition: Constants.h:25
Definition: Eigen_Colamd.h:49
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Definition: NumTraits.h:217
@ value
Definition: XprHelper.h:339
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE plain_array()=default
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE plain_array()
Definition: DenseStorage.h:72
Definition: DenseStorage.h:54
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE plain_array()
Definition: DenseStorage.h:59
EIGEN_ALIGN_TO_BOUNDARY(Alignment) T array[Size]
Definition: DenseStorage.h:519