Base class for Map and Block expression with direct access. More...
#include <MapBase.h>
Classes | |
struct | force_aligned_impl |
struct | force_aligned_impl< false, Dummy > |
Public Types | |
enum | { IsRowMajor = (int(ei_traits<Derived>::Flags) & RowMajorBit) ? 1 : 0, PacketAccess = ei_traits<Derived>::PacketAccess, RowsAtCompileTime = ei_traits<Derived>::RowsAtCompileTime, ColsAtCompileTime = ei_traits<Derived>::ColsAtCompileTime, SizeAtCompileTime = Base::SizeAtCompileTime } |
typedef ei_traits< Derived > ::AlignedDerivedType | AlignedDerivedType |
typedef MatrixBase< Derived > | Base |
typedef Base::PacketScalar | PacketScalar |
typedef ei_traits< Derived > ::Scalar | Scalar |
Public Member Functions | |
const Scalar | coeff (int index) const |
const Scalar & | coeff (int row, int col) const |
Scalar & | coeffRef (int index) |
Scalar & | coeffRef (int row, int col) |
int | cols () const |
const Scalar * | data () const |
AlignedDerivedType | forceAligned () |
MapBase (const Scalar *data, int rows, int cols) | |
MapBase (const Scalar *data, int size) | |
MapBase (const Scalar *data) | |
Derived & | operator*= (const Scalar &other) |
template<typename OtherDerived > | |
Derived & | operator+= (const MatrixBase< OtherDerived > &other) |
template<typename OtherDerived > | |
Derived & | operator-= (const MatrixBase< OtherDerived > &other) |
Derived & | operator/= (const Scalar &other) |
template<typename OtherDerived > | |
Derived & | operator= (const MatrixBase< OtherDerived > &other) |
Derived & | operator= (const MapBase &other) |
template<int LoadMode> | |
PacketScalar | packet (int index) const |
template<int LoadMode> | |
PacketScalar | packet (int row, int col) const |
int | rows () const |
int | stride () const |
template<int StoreMode> | |
void | writePacket (int index, const PacketScalar &x) |
template<int StoreMode> | |
void | writePacket (int row, int col, const PacketScalar &x) |
Protected Attributes | |
const ei_int_if_dynamic < ColsAtCompileTime > | m_cols |
const Scalar *EIGEN_RESTRICT | m_data |
const ei_int_if_dynamic < RowsAtCompileTime > | m_rows |
Base class for Map and Block expression with direct access.
Expression classes inheriting MapBase must define the constant PacketAccess
, and type AlignedDerivedType
in their respective ei_traits<> specialization structure. The value of PacketAccess
can be either:
AlignedDerivedType
should correspond to the equivalent expression type with PacketAccess
being ForceAligned
.Definition at line 43 of file MapBase.h.
typedef ei_traits<Derived>::AlignedDerivedType MapBase< Derived >::AlignedDerivedType |
typedef MatrixBase<Derived> MapBase< Derived >::Base |
typedef Base::PacketScalar MapBase< Derived >::PacketScalar |
Reimplemented from MatrixBase< Derived >.
Reimplemented from MatrixBase< Derived >.
anonymous enum |
IsRowMajor | |
PacketAccess | |
RowsAtCompileTime |
The number of rows at compile-time. This is just a copy of the value provided by the Derived type. If a value is not known at compile-time, it is set to the Dynamic constant. |
ColsAtCompileTime |
The number of columns at compile-time. This is just a copy of the value provided by the Derived type. If a value is not known at compile-time, it is set to the Dynamic constant. |
SizeAtCompileTime |
This is equal to the number of coefficients, i.e. the number of rows times the number of columns, or to Dynamic if this is not known at compile-time.
|
Short version: don't use this function, use operator[](int) const instead.
Long version: this function is similar to operator[](int) const , but without the assertion. Use this for limiting the performance cost of debugging code when doing repeated coefficient access. Only use this when it is guaranteed that the parameter index is in range.
If EIGEN_INTERNAL_DEBUGGING is defined, an assertion will be made, making this function equivalent to operator[](int) const .
Reimplemented from MatrixBase< Derived >.
const Scalar& MapBase< Derived >::coeff | ( | int | row, | |
int | col | |||
) | const [inline] |
Short version: don't use this function, use operator()(int,int) const instead.
Long version: this function is similar to operator()(int,int) const , but without the assertion. Use this for limiting the performance cost of debugging code when doing repeated coefficient access. Only use this when it is guaranteed that the parameters row and col are in range.
If EIGEN_INTERNAL_DEBUGGING is defined, an assertion will be made, making this function equivalent to operator()(int,int) const .
Reimplemented from MatrixBase< Derived >.
Short version: don't use this function, use operator[](int) instead.
Long version: this function is similar to operator[](int), but without the assertion. Use this for limiting the performance cost of debugging code when doing repeated coefficient access. Only use this when it is guaranteed that the parameters row and col are in range.
If EIGEN_INTERNAL_DEBUGGING is defined, an assertion will be made, making this function equivalent to operator[](int).
Reimplemented from MatrixBase< Derived >.
Short version: don't use this function, use operator()(int,int) instead.
Long version: this function is similar to operator()(int,int), but without the assertion. Use this for limiting the performance cost of debugging code when doing repeated coefficient access. Only use this when it is guaranteed that the parameters row and col are in range.
If EIGEN_INTERNAL_DEBUGGING is defined, an assertion will be made, making this function equivalent to operator()(int,int).
Reimplemented from MatrixBase< Derived >.
int MapBase< Derived >::cols | ( | ) | const [inline] |
Reimplemented from MatrixBase< Derived >.
AlignedDerivedType MapBase< Derived >::forceAligned | ( | ) | [inline] |
Derived& MapBase< Derived >::operator*= | ( | const Scalar & | other | ) | [inline] |
Reimplemented from MatrixBase< Derived >.
Derived& MapBase< Derived >::operator+= | ( | const MatrixBase< OtherDerived > & | other | ) | [inline] |
replaces *this
by *this
+ other.
*this
Reimplemented from MatrixBase< Derived >.
Derived& MapBase< Derived >::operator-= | ( | const MatrixBase< OtherDerived > & | other | ) | [inline] |
replaces *this
by *this
- other.
*this
Reimplemented from MatrixBase< Derived >.
Derived& MapBase< Derived >::operator/= | ( | const Scalar & | other | ) | [inline] |
Reimplemented from MatrixBase< Derived >.
Derived& MapBase< Derived >::operator= | ( | const MatrixBase< OtherDerived > & | other | ) | [inline] |
PacketScalar MapBase< Derived >::packet | ( | int | index | ) | const [inline] |
The LoadMode parameter may have the value Aligned or Unaligned. Its effect is to select the appropriate vectorization instruction. Aligned access is faster, but is only possible for packets starting at an address which is a multiple of the packet size.
Reimplemented from MatrixBase< Derived >.
PacketScalar MapBase< Derived >::packet | ( | int | row, | |
int | col | |||
) | const [inline] |
The LoadMode parameter may have the value Aligned or Unaligned. Its effect is to select the appropriate vectorization instruction. Aligned access is faster, but is only possible for packets starting at an address which is a multiple of the packet size.
Reimplemented from MatrixBase< Derived >.
int MapBase< Derived >::rows | ( | ) | const [inline] |
Reimplemented from MatrixBase< Derived >.
int MapBase< Derived >::stride | ( | void | ) | const [inline] |
Reimplemented from MatrixBase< Derived >.
Reimplemented in Block< MatrixType, BlockRows, BlockCols, PacketAccess, HasDirectAccess >, and Map< MatrixType, PacketAccess >.
void MapBase< Derived >::writePacket | ( | int | index, | |
const PacketScalar & | x | |||
) | [inline] |
void MapBase< Derived >::writePacket | ( | int | row, | |
int | col, | |||
const PacketScalar & | x | |||
) | [inline] |