Go to the documentation of this file.
11 #ifndef EIGEN_MAPBASE_H
12 #define EIGEN_MAPBASE_H
14 #define EIGEN_STATIC_ASSERT_INDEX_BASED_ACCESS(Derived) \
15 EIGEN_STATIC_ASSERT((int(internal::evaluator<Derived>::Flags) & LinearAccessBit) || Derived::IsVectorAtCompileTime, \
16 YOU_ARE_TRYING_TO_USE_AN_INDEX_BASED_ACCESSOR_ON_AN_EXPRESSION_THAT_DOES_NOT_SUPPORT_THAT)
47 SizeAtCompileTime = Base::SizeAtCompileTime
64 using Base::MaxRowsAtCompileTime;
65 using Base::MaxColsAtCompileTime;
66 using Base::MaxSizeAtCompileTime;
67 using Base::IsVectorAtCompileTime;
69 using Base::IsRowMajor;
76 using Base::lazyAssign;
79 using Base::innerStride;
80 using Base::outerStride;
81 using Base::rowStride;
82 using Base::colStride;
85 using Base::operator=;
108 return m_data[colId * colStride() + rowId * rowStride()];
116 return m_data[index * innerStride()];
123 return this->m_data[colId * colStride() + rowId * rowStride()];
131 return this->m_data[index * innerStride()];
135 template<
int LoadMode>
138 return internal::ploadt<PacketScalar, LoadMode>
139 (m_data + (colId * colStride() + rowId * rowStride()));
143 template<
int LoadMode>
147 return internal::ploadt<PacketScalar, LoadMode>(m_data + index * innerStride());
152 explicit inline MapBase(
PointerType dataPtr) : m_data(dataPtr), m_rows(RowsAtCompileTime), m_cols(ColsAtCompileTime)
155 checkSanity<Derived>();
162 m_rows(RowsAtCompileTime ==
Dynamic ? vecSize :
Index(RowsAtCompileTime)),
163 m_cols(ColsAtCompileTime ==
Dynamic ? vecSize :
Index(ColsAtCompileTime))
167 eigen_assert(dataPtr == 0 || SizeAtCompileTime ==
Dynamic || SizeAtCompileTime == vecSize);
168 checkSanity<Derived>();
174 : m_data(dataPtr), m_rows(
rows), m_cols(
cols)
177 || (
rows >= 0 && (RowsAtCompileTime ==
Dynamic || RowsAtCompileTime ==
rows)
178 &&
cols >= 0 && (ColsAtCompileTime ==
Dynamic || ColsAtCompileTime ==
cols)));
179 checkSanity<Derived>();
182 #ifdef EIGEN_MAPBASE_PLUGIN
183 #include EIGEN_MAPBASE_PLUGIN
194 #if EIGEN_MAX_ALIGN_BYTES>0
196 const Index minInnerStride = InnerStrideAtCompileTime ==
Dynamic ? 1 :
Index(InnerStrideAtCompileTime);
224 :
public MapBase<Derived, ReadOnlyAccessors>
241 using Base::coeffRef;
243 using Base::innerStride;
244 using Base::outerStride;
245 using Base::rowStride;
246 using Base::colStride;
262 return this->m_data[
col * colStride() +
row * rowStride()];
269 return this->m_data[index * innerStride()];
272 template<
int StoreMode>
275 internal::pstoret<Scalar, PacketScalar, StoreMode>
276 (this->m_data + (
col * colStride() +
row * rowStride()), val);
279 template<
int StoreMode>
283 internal::pstoret<Scalar, PacketScalar, StoreMode>
284 (this->m_data + index * innerStride(), val);
294 ReadOnlyMapBase::Base::operator=(
other);
300 using ReadOnlyMapBase::Base::operator=;
306 #undef EIGEN_STATIC_ASSERT_INDEX_BASED_ACCESS
310 #endif // EIGEN_MAPBASE_H
EIGEN_DEVICE_FUNC MapBase(PointerType dataPtr)
#define EIGEN_DEVICE_FUNC
internal::dense_xpr_base< Derived >::type Base
Base::PacketScalar PacketScalar
Namespace containing all symbols from the Eigen library.
NumTraits< Scalar >::Real RealScalar
EIGEN_DEVICE_FUNC void checkSanity(typename internal::enable_if< internal::traits< T >::Alignment==0, void * >::type=0) const
#define EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(Derived)
const EIGEN_DEVICE_FUNC Scalar & coeff(Index index) const
EIGEN_DEVICE_FUNC ScalarWithConstIfNotLvalue * data()
const internal::variable_if_dynamic< Index, ColsAtCompileTime > m_cols
PacketScalar packet(Index rowId, Index colId) const
EIGEN_DEVICE_FUNC Derived & operator=(const MapBase &other)
MapBase< Derived, ReadOnlyAccessors > ReadOnlyMapBase
EIGEN_DEVICE_FUNC MapBase(PointerType dataPtr)
#define EIGEN_STATIC_ASSERT_VECTOR_ONLY(TYPE)
const internal::variable_if_dynamic< Index, RowsAtCompileTime > m_rows
#define EIGEN_ONLY_USED_FOR_DEBUG(x)
const EIGEN_DEVICE_FUNC Scalar & coeff(Index rowId, Index colId) const
internal::traits< Derived >::StorageKind StorageKind
#define EIGEN_STATIC_ASSERT_INDEX_BASED_ACCESS(Derived)
internal::conditional< bool(internal::is_lvalue< Derived >::value), Scalar *, const Scalar * >::type PointerType
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
EIGEN_DEVICE_FUNC MapBase(PointerType dataPtr, Index rows, Index cols)
EIGEN_DEVICE_FUNC MapBase(PointerType dataPtr, Index rows, Index cols)
const EIGEN_DEVICE_FUNC Scalar & coeffRef(Index index) const
Base::PointerType PointerType
#define EIGEN_DEFAULT_COPY_CONSTRUCTOR(CLASS)
void writePacket(Index index, const PacketScalar &val)
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
const EIGEN_DEVICE_FUNC Scalar & coeffRef(Index rowId, Index colId) const
EIGEN_DEVICE_FUNC void checkSanity(typename internal::enable_if<(internal::traits< T >::Alignment >0), void * >::type=0) const
Base class for dense Map and Block expression with direct access.
const EIGEN_DEVICE_FUNC Scalar * data() const
internal::packet_traits< Scalar >::type PacketScalar
Base::StorageIndex StorageIndex
internal::traits< Derived >::Scalar Scalar
PacketScalar packet(Index index) const
const EIGEN_DEVICE_FUNC Scalar * data() const
#define EIGEN_STATIC_ASSERT_FIXED_SIZE(TYPE)
void writePacket(Index row, Index col, const PacketScalar &val)
EIGEN_DEVICE_FUNC ScalarWithConstIfNotLvalue & coeffRef(Index row, Index col)
EIGEN_DEVICE_FUNC MapBase(PointerType dataPtr, Index vecSize)
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
internal::nested_eval< T, 1 >::type eval(const T &xpr)
EIGEN_DEVICE_FUNC ScalarWithConstIfNotLvalue & coeffRef(Index index)
internal::conditional< internal::is_lvalue< Derived >::value, Scalar, const Scalar >::type ScalarWithConstIfNotLvalue
EIGEN_DEVICE_FUNC MapBase(PointerType dataPtr, Index vecSize)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Base::CoeffReturnType CoeffReturnType
MapBase< Derived, ReadOnlyAccessors > Base
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:02:56