10#ifndef EIGEN_DENSECOEFFSBASE_H
11#define EIGEN_DENSECOEFFSBASE_H
34template<
typename Derived>
67 return int(Derived::RowsAtCompileTime) == 1 ? 0
68 :
int(Derived::ColsAtCompileTime) == 1 ? inner
76 return int(Derived::ColsAtCompileTime) == 1 ? 0
77 :
int(Derived::RowsAtCompileTime) == 1 ? inner
107 return coeff(rowIndexByOuterInner(outer, inner),
108 colIndexByOuterInner(outer, inner));
143 THIS_COEFFICIENT_ACCESSOR_TAKING_ONE_ACCESS_IS_ONLY_FOR_EXPRESSIONS_ALLOWING_LINEAR_ACCESS)
162 THE_BRACKET_OPERATOR_IS_ONLY_FOR_VECTORS__USE_THE_PARENTHESIS_OPERATOR_INSTEAD)
189 x()
const {
return (*
this)[0]; }
197 EIGEN_STATIC_ASSERT(Derived::SizeAtCompileTime==-1 || Derived::SizeAtCompileTime>=2, OUT_OF_RANGE_ACCESS);
207 EIGEN_STATIC_ASSERT(Derived::SizeAtCompileTime==-1 || Derived::SizeAtCompileTime>=3, OUT_OF_RANGE_ACCESS);
217 EIGEN_STATIC_ASSERT(Derived::SizeAtCompileTime==-1 || Derived::SizeAtCompileTime>=4, OUT_OF_RANGE_ACCESS);
231 template<
int LoadMode>
241 template<
int LoadMode>
244 return packet<LoadMode>(rowIndexByOuterInner(outer, inner),
245 colIndexByOuterInner(outer, inner));
258 template<
int LoadMode>
262 THIS_COEFFICIENT_ACCESSOR_TAKING_ONE_ACCESS_IS_ONLY_FOR_EXPRESSIONS_ALLOWING_LINEAR_ACCESS)
301template<
typename Derived>
318 using Base::rowIndexByOuterInner;
319 using Base::colIndexByOuterInner;
320 using Base::operator[];
321 using Base::operator();
353 return coeffRef(rowIndexByOuterInner(outer, inner),
354 colIndexByOuterInner(outer, inner));
368 return coeffRef(
row,
col);
392 THIS_COEFFICIENT_ACCESSOR_TAKING_ONE_ACCESS_IS_ONLY_FOR_EXPRESSIONS_ALLOWING_LINEAR_ACCESS)
409 THE_BRACKET_OPERATOR_IS_ONLY_FOR_VECTORS__USE_THE_PARENTHESIS_OPERATOR_INSTEAD)
411 return coeffRef(index);
428 return coeffRef(index);
435 x() {
return (*
this)[0]; }
443 EIGEN_STATIC_ASSERT(Derived::SizeAtCompileTime==-1 || Derived::SizeAtCompileTime>=2, OUT_OF_RANGE_ACCESS);
453 EIGEN_STATIC_ASSERT(Derived::SizeAtCompileTime==-1 || Derived::SizeAtCompileTime>=3, OUT_OF_RANGE_ACCESS);
463 EIGEN_STATIC_ASSERT(Derived::SizeAtCompileTime==-1 || Derived::SizeAtCompileTime>=4, OUT_OF_RANGE_ACCESS);
480template<
typename Derived>
501 return derived().innerStride();
512 return derived().outerStride();
518 return Derived::IsVectorAtCompileTime ? innerStride() : outerStride();
528 return Derived::IsRowMajor ? outerStride() : innerStride();
538 return Derived::IsRowMajor ? innerStride() : outerStride();
554template<
typename Derived>
576 return derived().innerStride();
587 return derived().outerStride();
593 return Derived::IsVectorAtCompileTime ? innerStride() : outerStride();
603 return Derived::IsRowMajor ? outerStride() : innerStride();
613 return Derived::IsRowMajor ? innerStride() : outerStride();
619template<
int Alignment,
typename Derived,
bool JustReturnZero>
626template<
int Alignment,
typename Derived>
642template<
int Alignment,
typename Derived>
645 enum { ReturnZero = (
int(evaluator<Derived>::Alignment) >= Alignment) || !(Derived::Flags &
DirectAccessBit) };
649template<
typename Derived>
650static inline Index first_default_aligned(
const DenseBase<Derived>&
m)
652 typedef typename Derived::Scalar
Scalar;
653 typedef typename packet_traits<Scalar>::type DefaultPacketType;
657template<typename Derived, bool HasDirectAccess = has_direct_access<Derived>::ret>
663template<
typename Derived>
669template<typename Derived, bool HasDirectAccess = has_direct_access<Derived>::ret>
675template<
typename Derived>
Matrix3f m
Definition AngleAxis_mimic_euler.cpp:1
#define eigen_internal_assert(x)
Definition Macros.h:1043
#define EIGEN_NOEXCEPT
Definition Macros.h:1418
#define EIGEN_CONSTEXPR
Definition Macros.h:787
#define EIGEN_DEVICE_FUNC
Definition Macros.h:976
#define eigen_assert(x)
Definition Macros.h:1037
#define EIGEN_STRONG_INLINE
Definition Macros.h:917
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
Definition StaticAssert.h:127
int rows
Definition Tutorial_commainit_02.cpp:1
int cols
Definition Tutorial_commainit_02.cpp:1
Eigen::Triplet< double > T
Definition Tutorial_sparse_example.cpp:6
Scalar Scalar int size
Definition benchVecAdd.cpp:17
SCALAR Scalar
Definition bench_gemm.cpp:46
Base class for all dense matrices, vectors, and arrays.
Definition DenseBase.h:47
EIGEN_CONSTEXPR Index stride() const
Definition DenseCoeffsBase.h:516
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index colStride() const
Definition DenseCoeffsBase.h:536
DenseCoeffsBase< Derived, ReadOnlyAccessors > Base
Definition DenseCoeffsBase.h:485
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index outerStride() const
Definition DenseCoeffsBase.h:510
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rowStride() const
Definition DenseCoeffsBase.h:526
NumTraits< Scalar >::Real RealScalar
Definition DenseCoeffsBase.h:487
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index innerStride() const
Definition DenseCoeffsBase.h:499
internal::traits< Derived >::Scalar Scalar
Definition DenseCoeffsBase.h:486
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index innerStride() const EIGEN_NOEXCEPT
Definition DenseCoeffsBase.h:574
NumTraits< Scalar >::Real RealScalar
Definition DenseCoeffsBase.h:562
DenseCoeffsBase< Derived, WriteAccessors > Base
Definition DenseCoeffsBase.h:560
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rowStride() const EIGEN_NOEXCEPT
Definition DenseCoeffsBase.h:601
internal::traits< Derived >::Scalar Scalar
Definition DenseCoeffsBase.h:561
EIGEN_CONSTEXPR Index stride() const EIGEN_NOEXCEPT
Definition DenseCoeffsBase.h:591
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index outerStride() const EIGEN_NOEXCEPT
Definition DenseCoeffsBase.h:585
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index colStride() const EIGEN_NOEXCEPT
Definition DenseCoeffsBase.h:611
internal::packet_traits< Scalar >::type PacketScalar
Definition DenseCoeffsBase.h:40
internal::add_const_on_value_type_if_arithmetic< typenameinternal::packet_traits< Scalar >::type >::type PacketReturnType
Definition DenseCoeffsBase.h:56
internal::traits< Derived >::StorageKind StorageKind
Definition DenseCoeffsBase.h:38
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType operator()(Index row, Index col) const
Definition DenseCoeffsBase.h:116
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType x() const
Definition DenseCoeffsBase.h:189
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType w() const
Definition DenseCoeffsBase.h:215
void coeffRefByOuterInner()
internal::conditional< bool(internal::traits< Derived >::Flags &LvalueBit), constScalar &, typenameinternal::conditional< internal::is_arithmetic< Scalar >::value, Scalar, constScalar >::type >::type CoeffReturnType
Definition DenseCoeffsBase.h:52
EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const
Definition DenseCoeffsBase.h:259
void copyCoeffByOuterInner()
void writePacketByOuterInner()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType operator()(Index index) const
Definition DenseCoeffsBase.h:179
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index colIndexByOuterInner(Index outer, Index inner) const
Definition DenseCoeffsBase.h:74
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeffByOuterInner(Index outer, Index inner) const
Definition DenseCoeffsBase.h:105
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType z() const
Definition DenseCoeffsBase.h:205
EIGEN_STRONG_INLINE PacketReturnType packetByOuterInner(Index outer, Index inner) const
Definition DenseCoeffsBase.h:242
EIGEN_STRONG_INLINE PacketReturnType packet(Index row, Index col) const
Definition DenseCoeffsBase.h:232
internal::traits< Derived >::Scalar Scalar
Definition DenseCoeffsBase.h:39
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index rowIndexByOuterInner(Index outer, Index inner) const
Definition DenseCoeffsBase.h:65
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType operator[](Index index) const
Definition DenseCoeffsBase.h:159
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const
Definition DenseCoeffsBase.h:97
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
Definition DenseCoeffsBase.h:140
EigenBase< Derived > Base
Definition DenseCoeffsBase.h:58
void copyPacketByOuterInner()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType y() const
Definition DenseCoeffsBase.h:195
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & x()
Definition DenseCoeffsBase.h:435
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & operator[](Index index)
Definition DenseCoeffsBase.h:406
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & y()
Definition DenseCoeffsBase.h:441
NumTraits< Scalar >::Real RealScalar
Definition DenseCoeffsBase.h:311
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index row, Index col)
Definition DenseCoeffsBase.h:342
DenseCoeffsBase< Derived, ReadOnlyAccessors > Base
Definition DenseCoeffsBase.h:306
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & operator()(Index row, Index col)
Definition DenseCoeffsBase.h:364
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & z()
Definition DenseCoeffsBase.h:451
internal::packet_traits< Scalar >::type PacketScalar
Definition DenseCoeffsBase.h:310
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & operator()(Index index)
Definition DenseCoeffsBase.h:425
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index index)
Definition DenseCoeffsBase.h:389
internal::traits< Derived >::Scalar Scalar
Definition DenseCoeffsBase.h:309
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRefByOuterInner(Index outer, Index inner)
Definition DenseCoeffsBase.h:351
internal::traits< Derived >::StorageKind StorageKind
Definition DenseCoeffsBase.h:308
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & w()
Definition DenseCoeffsBase.h:461
Definition ForwardDeclarations.h:50
Definition TensorRef.h:81
@ DirectAccessors
Definition Constants.h:380
@ ReadOnlyAccessors
Definition Constants.h:376
@ WriteAccessors
Definition Constants.h:378
@ DirectWriteAccessors
Definition Constants.h:382
const unsigned int LinearAccessBit
Definition Constants.h:130
const unsigned int DirectAccessBit
Definition Constants.h:155
const unsigned int LvalueBit
Definition Constants.h:144
const unsigned int RowMajorBit
Definition Constants.h:66
Namespace containing all symbols from the Eigen library.
Definition bench_norm.cpp:85
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:74
Definition BandTriangularSolver.h:13
Definition EigenBase.h:30
Eigen::Index Index
The interface type of indices.
Definition EigenBase.h:39
T Real
Definition NumTraits.h:164
Definition DenseCoeffsBase.h:17
conditional< is_arithmetic< T >::value, T, typenameadd_const_on_value_type< T >::type >::type type
Definition DenseCoeffsBase.h:18
Definition CoreEvaluators.h:91
static Index run(const Derived &m)
Definition DenseCoeffsBase.h:629
Definition DenseCoeffsBase.h:621
static EIGEN_CONSTEXPR Index run(const Derived &) EIGEN_NOEXCEPT
Definition DenseCoeffsBase.h:622
Definition DenseCoeffsBase.h:659
@ ret
Definition DenseCoeffsBase.h:660
Definition DenseCoeffsBase.h:671
@ ret
Definition DenseCoeffsBase.h:672
Definition ForwardDeclarations.h:17
@ alignment
Definition GenericPacketMath.h:139