10 #ifndef EIGEN_DENSECOEFFSBASE_H
11 #define EIGEN_DENSECOEFFSBASE_H
37 template <
typename Derived>
65 return int(Derived::RowsAtCompileTime) == 1 ? 0
66 :
int(Derived::ColsAtCompileTime) == 1 ? inner
72 return int(Derived::ColsAtCompileTime) == 1 ? 0
73 :
int(Derived::RowsAtCompileTime) == 1 ? inner
99 return coeff(rowIndexByOuterInner(outer, inner), colIndexByOuterInner(outer, inner));
128 THIS_COEFFICIENT_ACCESSOR_TAKING_ONE_ACCESS_IS_ONLY_FOR_EXPRESSIONS_ALLOWING_LINEAR_ACCESS)
143 THE_BRACKET_OPERATOR_IS_ONLY_FOR_VECTORS__USE_THE_PARENTHESIS_OPERATOR_INSTEAD)
170 EIGEN_STATIC_ASSERT(Derived::SizeAtCompileTime == -1 || Derived::SizeAtCompileTime >= 2, OUT_OF_RANGE_ACCESS);
177 EIGEN_STATIC_ASSERT(Derived::SizeAtCompileTime == -1 || Derived::SizeAtCompileTime >= 3, OUT_OF_RANGE_ACCESS);
184 EIGEN_STATIC_ASSERT(Derived::SizeAtCompileTime == -1 || Derived::SizeAtCompileTime >= 4, OUT_OF_RANGE_ACCESS);
198 template <
int LoadMode>
206 template <
int LoadMode>
208 return packet<LoadMode>(rowIndexByOuterInner(outer, inner), colIndexByOuterInner(outer, inner));
221 template <
int LoadMode>
224 THIS_COEFFICIENT_ACCESSOR_TAKING_ONE_ACCESS_IS_ONLY_FOR_EXPRESSIONS_ALLOWING_LINEAR_ACCESS)
263 template <
typename Derived>
274 using Base::colIndexByOuterInner;
277 using Base::rowIndexByOuterInner;
280 using Base::operator[];
281 using Base::operator();
307 return coeffRef(rowIndexByOuterInner(outer, inner), colIndexByOuterInner(outer, inner));
317 return coeffRef(
row,
col);
337 THIS_COEFFICIENT_ACCESSOR_TAKING_ONE_ACCESS_IS_ONLY_FOR_EXPRESSIONS_ALLOWING_LINEAR_ACCESS)
351 THE_BRACKET_OPERATOR_IS_ONLY_FOR_VECTORS__USE_THE_PARENTHESIS_OPERATOR_INSTEAD)
353 return coeffRef(index);
367 return coeffRef(index);
377 EIGEN_STATIC_ASSERT(Derived::SizeAtCompileTime == -1 || Derived::SizeAtCompileTime >= 2, OUT_OF_RANGE_ACCESS);
384 EIGEN_STATIC_ASSERT(Derived::SizeAtCompileTime == -1 || Derived::SizeAtCompileTime >= 3, OUT_OF_RANGE_ACCESS);
391 EIGEN_STATIC_ASSERT(Derived::SizeAtCompileTime == -1 || Derived::SizeAtCompileTime >= 4, OUT_OF_RANGE_ACCESS);
408 template <
typename Derived>
441 return Derived::IsRowMajor ? outerStride() : innerStride();
449 return Derived::IsRowMajor ? innerStride() : outerStride();
465 template <
typename Derived>
492 return Derived::IsVectorAtCompileTime ? innerStride() : outerStride();
500 return Derived::IsRowMajor ? outerStride() : innerStride();
508 return Derived::IsRowMajor ? innerStride() : outerStride();
514 template <
int Alignment,
typename Derived,
bool JustReturnZero>
519 template <
int Alignment,
typename Derived>
521 static inline Index run(
const Derived&
m) {
return internal::first_aligned<Alignment>(
m.data(),
m.size()); }
532 template <
int Alignment,
typename Derived>
538 template <
typename Derived>
550 template <
typename Derived>
560 template <
typename Derived>
Eigen::Triplet< double > T
Definition: EigenUnitTest.cpp:11
#define eigen_internal_assert(x)
Definition: Macros.h:916
#define EIGEN_NOEXCEPT
Definition: Macros.h:1267
#define EIGEN_CONSTEXPR
Definition: Macros.h:758
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:892
#define eigen_assert(x)
Definition: Macros.h:910
#define EIGEN_STRONG_INLINE
Definition: Macros.h:834
RowVector3d w
Definition: Matrix_resize_int.cpp:3
#define EIGEN_STATIC_ASSERT(X, MSG)
Definition: StaticAssert.h:26
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 Scalar
Definition: bench_gemm.cpp:45
Base class for all dense matrices, vectors, and arrays.
Definition: DenseBase.h:44
EIGEN_CONSTEXPR Index stride() const
Definition: DenseCoeffsBase.h:434
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index colStride() const
Definition: DenseCoeffsBase.h:448
DenseCoeffsBase< Derived, ReadOnlyAccessors > Base
Definition: DenseCoeffsBase.h:411
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index outerStride() const
Definition: DenseCoeffsBase.h:431
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rowStride() const
Definition: DenseCoeffsBase.h:440
NumTraits< Scalar >::Real RealScalar
Definition: DenseCoeffsBase.h:413
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index innerStride() const
Definition: DenseCoeffsBase.h:424
internal::traits< Derived >::Scalar Scalar
Definition: DenseCoeffsBase.h:412
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index innerStride() const EIGEN_NOEXCEPT
Definition: DenseCoeffsBase.h:481
NumTraits< Scalar >::Real RealScalar
Definition: DenseCoeffsBase.h:470
DenseCoeffsBase< Derived, WriteAccessors > Base
Definition: DenseCoeffsBase.h:468
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rowStride() const EIGEN_NOEXCEPT
Definition: DenseCoeffsBase.h:499
internal::traits< Derived >::Scalar Scalar
Definition: DenseCoeffsBase.h:469
EIGEN_CONSTEXPR Index stride() const EIGEN_NOEXCEPT
Definition: DenseCoeffsBase.h:491
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index outerStride() const EIGEN_NOEXCEPT
Definition: DenseCoeffsBase.h:488
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index colStride() const EIGEN_NOEXCEPT
Definition: DenseCoeffsBase.h:507
Base class providing read-only coefficient access to matrices and arrays.
Definition: DenseCoeffsBase.h:38
internal::packet_traits< Scalar >::type PacketScalar
Definition: DenseCoeffsBase.h:42
internal::add_const_on_value_type_if_arithmetic< typename internal::packet_traits< Scalar >::type >::type PacketReturnType
Definition: DenseCoeffsBase.h:56
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR CoeffReturnType coeff(Index index) const
Definition: DenseCoeffsBase.h:126
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR CoeffReturnType operator()(Index row, Index col) const
Definition: DenseCoeffsBase.h:106
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR CoeffReturnType w() const
Definition: DenseCoeffsBase.h:183
internal::traits< Derived >::StorageKind StorageKind
Definition: DenseCoeffsBase.h:40
std::conditional_t< bool(internal::traits< Derived >::Flags &LvalueBit), const Scalar &, std::conditional_t< internal::is_arithmetic< Scalar >::value, Scalar, const Scalar > > CoeffReturnType
Definition: DenseCoeffsBase.h:53
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR CoeffReturnType x() const
Definition: DenseCoeffsBase.h:165
void coeffRefByOuterInner()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR CoeffReturnType y() const
Definition: DenseCoeffsBase.h:169
EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const
Definition: DenseCoeffsBase.h:222
void copyCoeffByOuterInner()
void writePacketByOuterInner()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR CoeffReturnType coeffByOuterInner(Index outer, Index inner) const
Definition: DenseCoeffsBase.h:97
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index colIndexByOuterInner(Index outer, Index inner) const
Definition: DenseCoeffsBase.h:71
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR CoeffReturnType z() const
Definition: DenseCoeffsBase.h:176
EIGEN_STRONG_INLINE PacketReturnType packetByOuterInner(Index outer, Index inner) const
Definition: DenseCoeffsBase.h:207
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR CoeffReturnType operator()(Index index) const
Definition: DenseCoeffsBase.h:158
EIGEN_STRONG_INLINE PacketReturnType packet(Index row, Index col) const
Definition: DenseCoeffsBase.h:199
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR CoeffReturnType operator[](Index index) const
Definition: DenseCoeffsBase.h:141
internal::traits< Derived >::Scalar Scalar
Definition: DenseCoeffsBase.h:41
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR CoeffReturnType coeff(Index row, Index col) const
Definition: DenseCoeffsBase.h:92
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index rowIndexByOuterInner(Index outer, Index inner) const
Definition: DenseCoeffsBase.h:64
EigenBase< Derived > Base
Definition: DenseCoeffsBase.h:58
void copyPacketByOuterInner()
Base class providing read/write coefficient access to matrices and arrays.
Definition: DenseCoeffsBase.h:264
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRefByOuterInner(Index outer, Index inner)
Definition: DenseCoeffsBase.h:306
NumTraits< Scalar >::Real RealScalar
Definition: DenseCoeffsBase.h:271
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Scalar & operator()(Index row, Index col)
Definition: DenseCoeffsBase.h:315
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Scalar & operator()(Index index)
Definition: DenseCoeffsBase.h:365
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Scalar & x()
Definition: DenseCoeffsBase.h:372
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Scalar & coeffRef(Index row, Index col)
Definition: DenseCoeffsBase.h:301
DenseCoeffsBase< Derived, ReadOnlyAccessors > Base
Definition: DenseCoeffsBase.h:266
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Scalar & coeffRef(Index index)
Definition: DenseCoeffsBase.h:335
internal::packet_traits< Scalar >::type PacketScalar
Definition: DenseCoeffsBase.h:270
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE Scalar & operator[](Index index)
Definition: DenseCoeffsBase.h:349
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Scalar & z()
Definition: DenseCoeffsBase.h:383
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Scalar & w()
Definition: DenseCoeffsBase.h:390
internal::traits< Derived >::Scalar Scalar
Definition: DenseCoeffsBase.h:269
internal::traits< Derived >::StorageKind StorageKind
Definition: DenseCoeffsBase.h:268
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Scalar & y()
Definition: DenseCoeffsBase.h:376
Definition: ForwardDeclarations.h:63
@ DirectAccessors
Definition: Constants.h:376
@ ReadOnlyAccessors
Definition: Constants.h:372
@ WriteAccessors
Definition: Constants.h:374
@ DirectWriteAccessors
Definition: Constants.h:378
const unsigned int LinearAccessBit
Definition: Constants.h:133
const unsigned int DirectAccessBit
Definition: Constants.h:159
const unsigned int LvalueBit
Definition: Constants.h:148
const unsigned int RowMajorBit
Definition: Constants.h:70
Scalar * y
Definition: level1_cplx_impl.h:128
Eigen::DenseIndex ret
Definition: level1_cplx_impl.h:43
int * m
Definition: level2_cplx_impl.h:294
static Index first_default_aligned(const DenseBase< Derived > &m)
Definition: DenseCoeffsBase.h:539
static Index first_aligned(const DenseBase< Derived > &m)
Definition: DenseCoeffsBase.h:533
typename add_const_on_value_type< T >::type add_const_on_value_type_t
Definition: Meta.h:274
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:70
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
type
Definition: compute_granudrum_aor.py:141
Definition: Eigen_Colamd.h:49
list x
Definition: plotDoE.py:28
Definition: EigenBase.h:33
Eigen::Index Index
The interface type of indices.
Definition: EigenBase.h:43
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Definition: NumTraits.h:217
Definition: DenseCoeffsBase.h:20
std::conditional_t< is_arithmetic< T >::value, T, add_const_on_value_type_t< T > > type
Definition: DenseCoeffsBase.h:21
Definition: CoreEvaluators.h:104
static Index run(const Derived &m)
Definition: DenseCoeffsBase.h:521
Definition: DenseCoeffsBase.h:515
static EIGEN_CONSTEXPR Index run(const Derived &) EIGEN_NOEXCEPT
Definition: DenseCoeffsBase.h:516
Definition: DenseCoeffsBase.h:546
@ ret
Definition: DenseCoeffsBase.h:547
Definition: DenseCoeffsBase.h:556
@ ret
Definition: DenseCoeffsBase.h:557
Definition: GenericPacketMath.h:108
Definition: ForwardDeclarations.h:21
Definition: GenericPacketMath.h:134