11 #ifndef EIGEN_DENSESTORAGEBASE_H
12 #define EIGEN_DENSESTORAGEBASE_H
14 #if defined(EIGEN_INITIALIZE_MATRICES_BY_ZERO)
15 #define EIGEN_INITIALIZE_COEFFS
16 #define EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED \
17 for (Index i = 0; i < base().size(); ++i) coeffRef(i) = Scalar(0);
18 #elif defined(EIGEN_INITIALIZE_MATRICES_BY_NAN)
19 #define EIGEN_INITIALIZE_COEFFS
20 #define EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED \
21 for (Index i = 0; i < base().size(); ++i) coeffRef(i) = std::numeric_limits<Scalar>::quiet_NaN();
23 #undef EIGEN_INITIALIZE_COEFFS
24 #define EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED
34 #ifndef EIGEN_NO_DEBUG
35 template <
int MaxSizeAtCompileTime,
int MaxRowsAtCompileTime,
int MaxColsAtCompileTime>
38 YOU MADE
A PROGRAMMING MISTAKE)
39 template <
typename Index>
43 template <
int MaxRowsAtCompileTime>
45 template <
typename Index>
48 bool error =
cols > (MaxIndex / MaxRowsAtCompileTime);
53 template <
int MaxColsAtCompileTime>
55 template <
typename Index>
58 bool error =
rows > (MaxIndex / MaxColsAtCompileTime);
65 template <
typename Index>
74 template <
typename Derived,
typename OtherDerived = Derived,
75 bool IsVector =
bool(Derived::IsVectorAtCompileTime) &&
bool(OtherDerived::IsVectorAtCompileTime)>
76 struct conservative_resize_like_impl;
78 template <
typename MatrixTypeA,
typename MatrixTypeB,
bool SwapPo
inters>
79 struct matrix_swap_impl;
83 #ifdef EIGEN_PARSED_BY_DOXYGEN
93 template <
typename Derived>
94 struct dense_xpr_base_dispatcher;
96 template <
typename Scalar_,
int Rows_,
int Cols_,
int Options_,
int MaxRows_,
int MaxCols_>
97 struct dense_xpr_base_dispatcher<Matrix<Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_>> :
public MatrixBase {};
99 template <
typename Scalar_,
int Rows_,
int Cols_,
int Options_,
int MaxRows_,
int MaxCols_>
100 struct dense_xpr_base_dispatcher<Array<Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_>> :
public ArrayBase {};
115 template <
typename Derived>
116 class PlainObjectBase :
public doxygen::dense_xpr_base_dispatcher<Derived>
118 template <typename Derived>
133 using Base::ColsAtCompileTime;
135 using Base::IsVectorAtCompileTime;
136 using Base::MaxColsAtCompileTime;
137 using Base::MaxRowsAtCompileTime;
138 using Base::MaxSizeAtCompileTime;
139 using Base::RowsAtCompileTime;
140 using Base::SizeAtCompileTime;
146 template <
typename Str
ideType>
150 template <
typename Str
ideType>
154 template <
typename Str
ideType>
158 template <
typename Str
ideType>
172 INVALID_MATRIX_TEMPLATE_PARAMETERS)
175 INVALID_MATRIX_TEMPLATE_PARAMETERS)
179 INVALID_MATRIX_TEMPLATE_PARAMETERS)
181 INVALID_MATRIX_TEMPLATE_PARAMETERS)
183 INVALID_MATRIX_TEMPLATE_PARAMETERS)
185 INVALID_MATRIX_TEMPLATE_PARAMETERS)
246 template <
int LoadMode>
248 return internal::ploadt<PacketScalar, LoadMode>(
253 template <
int LoadMode>
255 return internal::ploadt<PacketScalar, LoadMode>(
m_storage.
data() + index);
259 template <
int StoreMode>
261 internal::pstoret<Scalar, PacketScalar, StoreMode>(
267 template <
int StoreMode>
269 internal::pstoret<Scalar, PacketScalar, StoreMode>(
m_storage.
data() + index,
val);
298 rows <= MaxRowsAtCompileTime) &&
300 cols <= MaxColsAtCompileTime) &&
301 rows >= 0 &&
cols >= 0 &&
"Invalid sizes when resizing a matrix or array.");
302 #ifndef EIGEN_NO_DEBUG
306 #ifdef EIGEN_INITIALIZE_COEFFS
308 bool size_changed =
size != this->
size();
330 SizeAtCompileTime ==
size) &&
332 #ifdef EIGEN_INITIALIZE_COEFFS
333 bool size_changed =
size != this->
size();
335 if (RowsAtCompileTime == 1)
339 #ifdef EIGEN_INITIALIZE_COEFFS
371 template <
typename OtherDerived>
373 const OtherDerived& other = _other.
derived();
374 #ifndef EIGEN_NO_DEBUG
376 other.rows(), other.cols());
378 const Index othersize = other.rows() * other.cols();
379 if (RowsAtCompileTime == 1) {
382 }
else if (ColsAtCompileTime == 1) {
386 resize(other.rows(), other.cols());
447 template <
typename OtherDerived>
460 template <
typename OtherDerived>
463 return Base::lazyAssign(other.derived());
466 template <
typename OtherDerived>
469 return Base::operator=(
func);
498 template <
typename... ArgTypes>
509 static_cast<void>(
x);
516 const std::initializer_list<std::initializer_list<Scalar>>& list)
518 size_t list_size = 0;
519 if (list.begin() != list.end()) {
520 list_size = list.begin()->
size();
524 if (ColsAtCompileTime == 1 && list.size() == 1) {
525 eigen_assert(list_size ==
static_cast<size_t>(RowsAtCompileTime) || RowsAtCompileTime ==
Dynamic);
526 resize(list_size, ColsAtCompileTime);
527 if (list.begin()->begin() !=
nullptr) {
529 for (
const Scalar&
e : *list.begin()) {
534 eigen_assert(list.size() ==
static_cast<size_t>(RowsAtCompileTime) || RowsAtCompileTime ==
Dynamic);
535 eigen_assert(list_size ==
static_cast<size_t>(ColsAtCompileTime) || ColsAtCompileTime ==
Dynamic);
536 resize(list.size(), list_size);
539 for (
const std::initializer_list<Scalar>&
row : list) {
552 template <
typename OtherDerived>
559 template <
typename OtherDerived>
565 template <
typename OtherDerived>
569 other.
evalTo(this->derived());
576 template <
typename OtherDerived>
579 Base::operator=(other.
derived());
580 return this->derived();
615 template <
int Outer,
int Inner>
620 template <
int Outer,
int Inner>
625 template <
int Outer,
int Inner>
630 template <
int Outer,
int Inner>
635 template <
int Outer,
int Inner>
640 template <
int Outer,
int Inner>
646 template <
int Outer,
int Inner>
651 template <
int Outer,
int Inner>
656 template <
int Outer,
int Inner>
661 template <
int Outer,
int Inner>
666 template <
int Outer,
int Inner>
671 template <
int Outer,
int Inner>
702 #ifdef EIGEN_PLAINOBJECTBASE_PLUGIN
703 #include EIGEN_PLAINOBJECTBASE_PLUGIN
714 template <
typename OtherDerived>
716 #ifdef EIGEN_NO_AUTOMATIC_RESIZING
719 "Size mismatch. Automatic resizing is disabled because EIGEN_NO_AUTOMATIC_RESIZING is defined");
742 template <
typename OtherDerived>
745 return this->derived();
753 template <
typename OtherDerived>
762 return this->derived();
765 template <
typename T0,
typename T1>
767 std::enable_if_t<Base::SizeAtCompileTime != 2, T0>* = 0) {
769 T0
AND T1 MUST BE INTEGER TYPES)
773 template <
typename T0,
typename T1>
775 std::enable_if_t<Base::SizeAtCompileTime == 2, T0>* = 0) {
781 template <
typename T0,
typename T1>
794 template <
typename T>
799 Base::SizeAtCompileTime ==
Dynamic)),
804 EIGEN_STATIC_ASSERT(is_integer_alike, FLOATING_POINT_ARGUMENT_PASSED__INTEGER_WAS_EXPECTED)
810 template <
typename T>
820 template <
typename T>
831 template <
typename T>
837 template <
typename T,
typename OtherDerived>
843 template <
typename T>
849 template <
typename T,
typename OtherDerived>
851 this->derived() = other;
854 template <
typename T,
typename OtherDerived>
857 other.
evalTo(this->derived());
860 template <
typename T,
typename OtherDerived,
int ColsAtCompileTime>
866 template <
typename T>
869 std::enable_if_t<Base::SizeAtCompileTime !=
Dynamic && Base::SizeAtCompileTime != 1 &&
877 template <
typename T>
881 Base::SizeAtCompileTime !=
Dynamic && Base::SizeAtCompileTime != 1 &&
888 template <
typename MatrixTypeA,
typename MatrixTypeB,
bool SwapPo
inters>
892 #ifndef EIGEN_PARSED_BY_DOXYGEN
897 template <
typename OtherDerived>
906 template <
typename OtherDerived>
916 template <
typename PlainObjectType,
int MapOptions,
typename Str
ideType>
920 #if EIGEN_MAX_ALIGN_BYTES > 0
930 template <
typename Derived,
typename OtherDerived,
bool IsVector>
934 if (_this.rows() ==
rows && _this.cols() ==
cols)
return;
938 ((Derived::IsRowMajor && _this.cols() ==
cols) ||
939 (!Derived::IsRowMajor && _this.rows() ==
rows)))
941 #ifndef EIGEN_NO_DEBUG
951 tmp.block(0, 0, common_rows, common_cols) = _this.block(0, 0, common_rows, common_cols);
957 if (_this.rows() == other.rows() && _this.cols() == other.cols())
return;
968 ((Derived::IsRowMajor && _this.cols() == other.cols()) ||
969 (!Derived::IsRowMajor &&
970 _this.rows() == other.rows())))
972 const Index new_rows = other.rows() - _this.rows();
973 const Index new_cols = other.cols() - _this.cols();
974 _this.derived().m_storage.conservativeResize(other.size(), other.rows(), other.cols());
976 _this.bottomRightCorner(new_rows, other.cols()) = other.bottomRows(new_rows);
977 else if (new_cols > 0)
978 _this.bottomRightCorner(other.rows(), new_cols) = other.rightCols(new_cols);
984 tmp.block(0, 0, common_rows, common_cols) = _this.block(0, 0, common_rows, common_cols);
992 template <
typename Derived,
typename OtherDerived>
996 using Base::IsRelocatable;
1000 const Index new_rows = Derived::RowsAtCompileTime == 1 ? 1 :
size;
1001 const Index new_cols = Derived::RowsAtCompileTime == 1 ?
size : 1;
1003 _this.derived().m_storage.conservativeResize(
size, new_rows, new_cols);
1005 Base::run(_this.derived(), new_rows, new_cols);
1009 if (_this.rows() == other.rows() && _this.cols() == other.cols())
return;
1011 const Index num_new_elements = other.size() - _this.size();
1013 const Index new_rows = Derived::RowsAtCompileTime == 1 ? 1 : other.rows();
1014 const Index new_cols = Derived::RowsAtCompileTime == 1 ? other.cols() : 1;
1016 _this.derived().m_storage.conservativeResize(other.size(), new_rows, new_cols);
1018 Base::run(_this.derived(), new_rows, new_cols);
1020 if (num_new_elements > 0) _this.tail(num_new_elements) = other.tail(num_new_elements);
1024 template <
typename MatrixTypeA,
typename MatrixTypeB,
bool SwapPo
inters>
1029 template <
typename MatrixTypeA,
typename MatrixTypeB>
1032 static_cast<typename MatrixTypeA::Base&
>(
a).m_storage.
swap(
static_cast<typename MatrixTypeB::Base&
>(
b).m_storage);
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Array< double, 1, 3 > e(1./3., 0.5, 2.)
#define EIGEN_ALWAYS_INLINE
Definition: Macros.h:845
#define EIGEN_NOEXCEPT
Definition: Macros.h:1267
#define EIGEN_CONSTEXPR
Definition: Macros.h:758
#define EIGEN_UNUSED_VARIABLE(var)
Definition: Macros.h:966
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:892
#define EIGEN_ONLY_USED_FOR_DEBUG(x)
Definition: Macros.h:922
#define eigen_assert(x)
Definition: Macros.h:910
#define EIGEN_STRONG_INLINE
Definition: Macros.h:834
#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)
Definition: Memory.h:876
#define EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED
Definition: PlainObjectBase.h:24
#define EIGEN_STATIC_ASSERT_DYNAMIC_SIZE(TYPE)
Definition: StaticAssert.h:45
#define EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(TYPE, SIZE)
Definition: StaticAssert.h:50
#define EIGEN_STATIC_ASSERT_VECTOR_ONLY(TYPE)
Definition: StaticAssert.h:36
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
SCALAR Scalar
Definition: bench_gemm.cpp:45
Base class for all dense matrices, vectors, and arrays.
Definition: DenseBase.h:44
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void swap(const DenseBase< OtherDerived > &other)
Definition: DenseBase.h:392
A matrix or vector expression mapping an existing array of data.
Definition: Map.h:96
The matrix class, also used for vectors and row-vectors.
Definition: Eigen/Eigen/src/Core/Matrix.h:186
Definition: PlainObjectBase.h:121
Eigen::Map< Derived, Unaligned > MapType
Definition: PlainObjectBase.h:142
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Scalar & coeffRef(Index rowId, Index colId)
Definition: PlainObjectBase.h:217
Eigen::Map< Derived, AlignedMax > AlignedMapType
Definition: PlainObjectBase.h:144
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE PlainObjectBase(PlainObjectBase &&)=default
Move constructor.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator=(const ReturnByValue< OtherDerived > &func)
Definition: PlainObjectBase.h:467
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init1(const EigenBase< OtherDerived > &other)
Definition: PlainObjectBase.h:850
static StridedConstMapType< Stride< Outer, Inner > >::type Map(const Scalar *data, Index rows, Index cols, const Stride< Outer, Inner > &stride)
Definition: PlainObjectBase.h:636
DenseStorage< Scalar, Base::MaxSizeAtCompileTime, Base::RowsAtCompileTime, Base::ColsAtCompileTime, Options > m_storage
Definition: PlainObjectBase.h:164
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PlainObjectBase(Index size, Index rows, Index cols)
Definition: PlainObjectBase.h:486
static StridedMapType< Stride< Outer, Inner > >::type Map(Scalar *data, const Stride< Outer, Inner > &stride)
Definition: PlainObjectBase.h:621
EIGEN_DEVICE_FUNC Derived & setOnes(Index size)
Definition: CwiseNullaryOp.h:708
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Derived & _set_noalias(const DenseBase< OtherDerived > &other)
Definition: PlainObjectBase.h:754
static StridedAlignedMapType< Stride< Outer, Inner > >::type MapAligned(Scalar *data, Index size, const Stride< Outer, Inner > &stride)
Definition: PlainObjectBase.h:662
internal::packet_traits< Scalar >::type PacketScalar
Definition: PlainObjectBase.h:129
@ Options
Definition: PlainObjectBase.h:123
constexpr EIGEN_DEVICE_FUNC void resize(Index rows, NoChange_t)
Definition: PlainObjectBase.h:362
@ NeedsToAlign
Definition: PlainObjectBase.h:167
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PlainObjectBase(const EigenBase< OtherDerived > &other)
Definition: PlainObjectBase.h:560
EIGEN_DEVICE_FUNC const Base & base() const
Definition: PlainObjectBase.h:189
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void conservativeResize(NoChange_t, Index cols)
Definition: PlainObjectBase.h:421
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE const Scalar & coeff(Index rowId, Index colId) const
Definition: PlainObjectBase.h:198
NumTraits< Scalar >::Real RealScalar
Definition: PlainObjectBase.h:130
static StridedConstAlignedMapType< Stride< Outer, Inner > >::type MapAligned(const Scalar *data, Index rows, Index cols, const Stride< Outer, Inner > &stride)
Definition: PlainObjectBase.h:667
const Eigen::Map< const Derived, AlignedMax > ConstAlignedMapType
Definition: PlainObjectBase.h:145
constexpr EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PlainObjectBase(const std::initializer_list< std::initializer_list< Scalar >> &list)
Constructs a Matrix or Array and initializes it by elements given by an initializer list of initializ...
Definition: PlainObjectBase.h:515
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init2(Index rows, Index cols, std::enable_if_t< Base::SizeAtCompileTime !=2, T0 > *=0)
Definition: PlainObjectBase.h:766
constexpr EIGEN_DEVICE_FUNC const Scalar * data() const
Definition: PlainObjectBase.h:273
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void conservativeResize(Index rows, NoChange_t)
Definition: PlainObjectBase.h:409
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void conservativeResize(Index size)
Definition: PlainObjectBase.h:434
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void conservativeResize(Index rows, Index cols)
Definition: PlainObjectBase.h:398
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & lazyAssign(const DenseBase< OtherDerived > &other)
Definition: PlainObjectBase.h:461
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init1(const DenseBase< OtherDerived > &other)
Definition: PlainObjectBase.h:838
constexpr EIGEN_DEVICE_FUNC void resize(NoChange_t, Index cols)
Definition: PlainObjectBase.h:352
static AlignedMapType MapAligned(Scalar *data, Index size)
Definition: PlainObjectBase.h:607
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Scalar & coeffRef(Index index)
Definition: PlainObjectBase.h:228
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & operator=(const EigenBase< OtherDerived > &other)
Copies the generic expression other into *this.
Definition: PlainObjectBase.h:577
static ConstAlignedMapType MapAligned(const Scalar *data, Index size)
Definition: PlainObjectBase.h:604
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Definition: PlainObjectBase.h:192
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void conservativeResizeLike(const DenseBase< OtherDerived > &other)
Definition: PlainObjectBase.h:448
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init1(const Scalar &val0, std::enable_if_t< Base::SizeAtCompileTime !=Dynamic &&Base::SizeAtCompileTime !=1 &&internal::is_convertible< T, Scalar >::value &&internal::is_same< typename internal::traits< Derived >::XprKind, ArrayXpr >::value, T > *=0)
Definition: PlainObjectBase.h:867
internal::traits< Derived >::Scalar Scalar
Definition: PlainObjectBase.h:127
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Derived & _set(const DenseBase< OtherDerived > &other)
Copies the value of the expression other into *this with automatic resizing.
Definition: PlainObjectBase.h:743
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PlainObjectBase(const DenseBase< OtherDerived > &other)
Definition: PlainObjectBase.h:553
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init1(const Index &val0, std::enable_if_t<(!internal::is_same< Index, Scalar >::value) &&(internal::is_same< Index, T >::value) &&Base::SizeAtCompileTime==1 &&internal::is_convertible< T, Scalar >::value, T * > *=0)
Definition: PlainObjectBase.h:821
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE PlainObjectBase(const PlainObjectBase &)=default
EIGEN_STRONG_INLINE PacketScalar packet(Index rowId, Index colId) const
Definition: PlainObjectBase.h:247
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void swap(DenseBase< OtherDerived > const &other)
const version forwarded to DenseBase::swap
Definition: PlainObjectBase.h:907
static ConstAlignedMapType MapAligned(const Scalar *data, Index rows, Index cols)
Definition: PlainObjectBase.h:608
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init1(const Scalar &val0, std::enable_if_t< Base::SizeAtCompileTime==1 &&internal::is_convertible< T, Scalar >::value, T > *=0)
Definition: PlainObjectBase.h:811
static StridedConstMapType< Stride< Outer, Inner > >::type Map(const Scalar *data, const Stride< Outer, Inner > &stride)
Definition: PlainObjectBase.h:616
static StridedConstAlignedMapType< Stride< Outer, Inner > >::type MapAligned(const Scalar *data, Index size, const Stride< Outer, Inner > &stride)
Definition: PlainObjectBase.h:657
static AlignedMapType MapAligned(Scalar *data, Index rows, Index cols)
Definition: PlainObjectBase.h:611
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE PlainObjectBase()=default
@ IsPlainObjectBase
Definition: PlainObjectBase.h:911
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Derived & operator=(const PlainObjectBase &other)
Definition: PlainObjectBase.h:455
static AlignedMapType MapAligned(Scalar *data)
Definition: PlainObjectBase.h:603
static StridedConstAlignedMapType< Stride< Outer, Inner > >::type MapAligned(const Scalar *data, const Stride< Outer, Inner > &stride)
Definition: PlainObjectBase.h:647
static StridedMapType< Stride< Outer, Inner > >::type Map(Scalar *data, Index size, const Stride< Outer, Inner > &stride)
Definition: PlainObjectBase.h:631
static ConstMapType Map(const Scalar *data)
Definition: PlainObjectBase.h:595
static MapType Map(Scalar *data, Index size)
Definition: PlainObjectBase.h:598
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PlainObjectBase(const Scalar &a0, const Scalar &a1, const Scalar &a2, const Scalar &a3, const ArgTypes &... args)
Construct a row of column vector with fixed size from an arbitrary number of coefficients.
Definition: PlainObjectBase.h:499
static MapType Map(Scalar *data)
Definition: PlainObjectBase.h:596
constexpr EIGEN_DEVICE_FUNC PlainObjectBase & operator=(PlainObjectBase &&other) EIGEN_NOEXCEPT
Move assignment operator.
Definition: PlainObjectBase.h:479
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PlainObjectBase(const ReturnByValue< OtherDerived > &other)
Copy constructor with in-place evaluation.
Definition: PlainObjectBase.h:566
static ConstMapType Map(const Scalar *data, Index size)
Definition: PlainObjectBase.h:597
static StridedAlignedMapType< Stride< Outer, Inner > >::type MapAligned(Scalar *data, const Stride< Outer, Inner > &stride)
Definition: PlainObjectBase.h:652
EIGEN_DEVICE_FUNC Derived & setZero(Index size)
Definition: CwiseNullaryOp.h:569
Derived DenseType
Definition: PlainObjectBase.h:131
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init2(const T0 &val0, const T1 &val1, std::enable_if_t< Base::SizeAtCompileTime==2, T0 > *=0)
Definition: PlainObjectBase.h:774
constexpr EIGEN_DEVICE_FUNC Scalar * data()
Definition: PlainObjectBase.h:276
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _resize_to_match(const EigenBase< OtherDerived > &other)
Definition: PlainObjectBase.h:715
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE const Scalar & coeff(Index index) const
Definition: PlainObjectBase.h:209
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init1(const RotationBase< OtherDerived, ColsAtCompileTime > &r)
Definition: PlainObjectBase.h:861
EIGEN_DEVICE_FUNC Derived & setConstant(Index size, const Scalar &val)
Definition: CwiseNullaryOp.h:365
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init1(const ReturnByValue< OtherDerived > &other)
Definition: PlainObjectBase.h:855
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void resizeLike(const EigenBase< OtherDerived > &_other)
Definition: PlainObjectBase.h:372
constexpr EIGEN_DEVICE_FUNC void resize(Index size)
Definition: PlainObjectBase.h:327
EIGEN_STRONG_INLINE void writePacket(Index index, const PacketScalar &val)
Definition: PlainObjectBase.h:268
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init1(const Index &val0, std::enable_if_t<(!internal::is_same< Index, Scalar >::value) &&(internal::is_same< Index, T >::value) &&Base::SizeAtCompileTime !=Dynamic &&Base::SizeAtCompileTime !=1 &&internal::is_convertible< T, Scalar >::value &&internal::is_same< typename internal::traits< Derived >::XprKind, ArrayXpr >::value, T * > *=0)
Definition: PlainObjectBase.h:878
static MapType Map(Scalar *data, Index rows, Index cols)
Definition: PlainObjectBase.h:600
static StridedMapType< Stride< Outer, Inner > >::type Map(Scalar *data, Index rows, Index cols, const Stride< Outer, Inner > &stride)
Definition: PlainObjectBase.h:641
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init2(const Index &val0, const Index &val1, std::enable_if_t<(!internal::is_same< Index, Scalar >::value) &&(internal::is_same< T0, Index >::value) &&(internal::is_same< T1, Index >::value) &&Base::SizeAtCompileTime==2, T1 > *=0)
Definition: PlainObjectBase.h:782
EIGEN_STRONG_INLINE void writePacket(Index rowId, Index colId, const PacketScalar &val)
Definition: PlainObjectBase.h:260
EIGEN_STATIC_ASSERT(internal::check_implication(MaxRowsAtCompileTime==1 &&MaxColsAtCompileTime !=1,(int(Options) &RowMajor)==RowMajor), INVALID_MATRIX_TEMPLATE_PARAMETERS) EIGEN_STATIC_ASSERT(internal
Definition: PlainObjectBase.h:170
static ConstMapType Map(const Scalar *data, Index rows, Index cols)
Definition: PlainObjectBase.h:599
static ConstAlignedMapType MapAligned(const Scalar *data)
Definition: PlainObjectBase.h:602
static StridedConstMapType< Stride< Outer, Inner > >::type Map(const Scalar *data, Index size, const Stride< Outer, Inner > &stride)
Definition: PlainObjectBase.h:626
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init1(const Derived &other)
Definition: PlainObjectBase.h:844
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init1(const Scalar *data)
Definition: PlainObjectBase.h:832
Derived & setRandom(Index size)
Definition: Random.h:147
internal::traits< Derived >::StorageKind StorageKind
Definition: PlainObjectBase.h:126
static StridedAlignedMapType< Stride< Outer, Inner > >::type MapAligned(Scalar *data, Index rows, Index cols, const Stride< Outer, Inner > &stride)
Definition: PlainObjectBase.h:672
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void resize(Index rows, Index cols)
Definition: PlainObjectBase.h:294
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE const Scalar & coeffRef(Index rowId, Index colId) const
Definition: PlainObjectBase.h:232
internal::dense_xpr_base< Derived >::type Base
Definition: PlainObjectBase.h:124
const Eigen::Map< const Derived, Unaligned > ConstMapType
Definition: PlainObjectBase.h:143
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void swap(DenseBase< OtherDerived > &other)
Override DenseBase::swap() since for dynamic-sized matrices of same type it is enough to swap the dat...
Definition: PlainObjectBase.h:898
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _init1(Index size, std::enable_if_t<(Base::SizeAtCompileTime !=1||!internal::is_convertible< T, Scalar >::value) &&((!internal::is_same< typename internal::traits< Derived >::XprKind, ArrayXpr >::value||Base::SizeAtCompileTime==Dynamic)), T > *=0)
Definition: PlainObjectBase.h:795
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE const Scalar & coeffRef(Index index) const
Definition: PlainObjectBase.h:241
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
Definition: PlainObjectBase.h:191
EIGEN_STRONG_INLINE PacketScalar packet(Index index) const
Definition: PlainObjectBase.h:254
Definition: ReturnByValue.h:50
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
Definition: ReturnByValue.h:61
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Definition: ReturnByValue.h:64
EIGEN_DEVICE_FUNC void evalTo(Dest &dst) const
Definition: ReturnByValue.h:58
Common base class for compact rotation representations.
Definition: RotationBase.h:32
Holds strides information for Map.
Definition: Stride.h:55
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 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 T * data()
Definition: DenseStorage.h:122
@ Unaligned
Definition: Constants.h:235
@ AlignedMax
Definition: Constants.h:254
@ DontAlign
Definition: Constants.h:324
@ RowMajor
Definition: Constants.h:320
const unsigned int RowMajorBit
Definition: Constants.h:70
EIGEN_BLAS_FUNC() swap(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy)
Definition: level1_impl.h:117
const Scalar * a
Definition: level2_cplx_impl.h:32
Eigen::Matrix< Scalar, Dynamic, Dynamic, ColMajor > tmp
Definition: level3_impl.h:365
constexpr bool check_implication(bool a, bool b)
Definition: Meta.h:740
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void call_assignment(Dst &dst, const Src &src)
Definition: AssignEvaluator.h:781
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR void call_assignment_no_alias(Dst &dst, const Src &src, const Func &func)
Definition: AssignEvaluator.h:812
EIGEN_DEVICE_FUNC void throw_std_bad_alloc()
Definition: Memory.h:110
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
auto run(Kernel kernel, Args &&... args) -> decltype(kernel(args...))
Definition: gpu_test_helper.h:414
squared absolute value
Definition: GlobalFunctions.h:87
NoChange_t
Definition: Constants.h:359
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
Extend namespace for flags.
Definition: fsi_chan_precond_driver.cc:56
val
Definition: calibrate.py:119
int error
Definition: calibrate.py:297
args
Definition: compute_granudrum_aor.py:143
type
Definition: compute_granudrum_aor.py:141
Definition: Eigen_Colamd.h:49
list x
Definition: plotDoE.py:28
#define AND(a, b)
Definition: oomph_metis_from_parmetis_3.1.1/macros.h:24
Definition: Constants.h:537
Definition: EigenBase.h:33
constexpr EIGEN_DEVICE_FUNC Derived & derived()
Definition: EigenBase.h:49
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Definition: EigenBase.h:61
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index size() const EIGEN_NOEXCEPT
Definition: EigenBase.h:64
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
Definition: EigenBase.h:59
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Definition: NumTraits.h:217
Definition: PlainObjectBase.h:155
Eigen::Map< Derived, AlignedMax, StrideType > type
Definition: PlainObjectBase.h:156
Definition: PlainObjectBase.h:159
Eigen::Map< const Derived, AlignedMax, StrideType > type
Definition: PlainObjectBase.h:160
Definition: PlainObjectBase.h:151
Eigen::Map< const Derived, Unaligned, StrideType > type
Definition: PlainObjectBase.h:152
Definition: PlainObjectBase.h:147
Eigen::Map< Derived, Unaligned, StrideType > type
Definition: PlainObjectBase.h:148
Template functor for scalar/packet assignment.
Definition: AssignmentFunctors.h:25
static EIGEN_DEVICE_FUNC constexpr EIGEN_ALWAYS_INLINE void run(Index rows, Index cols)
Definition: PlainObjectBase.h:66
static EIGEN_DEVICE_FUNC constexpr EIGEN_ALWAYS_INLINE void run(Index rows, Index)
Definition: PlainObjectBase.h:56
static EIGEN_DEVICE_FUNC constexpr EIGEN_ALWAYS_INLINE void run(Index, Index cols)
Definition: PlainObjectBase.h:46
Definition: PlainObjectBase.h:36
EIGEN_STATIC_ASSERT(MaxRowsAtCompileTime *MaxColsAtCompileTime==MaxSizeAtCompileTime, YOU MADE A PROGRAMMING MISTAKE) template< typename Index > EIGEN_DEVICE_FUNC static EIGEN_ALWAYS_INLINE const expr void run(Index
conservative_resize_like_impl< Derived, OtherDerived, false > Base
Definition: PlainObjectBase.h:995
static void run(DenseBase< Derived > &_this, Index size)
Definition: PlainObjectBase.h:999
static void run(DenseBase< Derived > &_this, const DenseBase< OtherDerived > &other)
Definition: PlainObjectBase.h:1008
Definition: PlainObjectBase.h:931
static constexpr bool IsRelocatable
Definition: PlainObjectBase.h:932
static void run(DenseBase< Derived > &_this, Index rows, Index cols)
Definition: PlainObjectBase.h:933
static void run(DenseBase< Derived > &_this, const DenseBase< OtherDerived > &other)
Definition: PlainObjectBase.h:956
Definition: XprHelper.h:558
Definition: XprHelper.h:69
static EIGEN_DEVICE_FUNC void run(MatrixTypeA &a, MatrixTypeB &b)
Definition: PlainObjectBase.h:1031
Definition: PlainObjectBase.h:1025
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(MatrixTypeA &a, MatrixTypeB &b)
Definition: PlainObjectBase.h:1026
Definition: ForwardDeclarations.h:21
Definition: benchGeometry.cpp:21
void run(const string &dir_name, LinearSolver *linear_solver_pt, const unsigned nel_1d, bool mess_up_order)
Definition: two_d_poisson_compare_solvers.cc:317