![]() |
Implementation of a generic iterator for dense vectors and matrices.The DenseIterator represents a generic random-access iterator that can be used for dense vectors and specific rows/columns of dense matrices. More...
#include <DenseIterator.h>
Public Types | |
typedef std::random_access_iterator_tag | IteratorCategory |
The iterator category. | |
typedef Type | ValueType |
Type of the underlying elements. | |
typedef Type * | PointerType |
Pointer return type. | |
typedef Type & | ReferenceType |
Reference return type. | |
typedef ptrdiff_t | DifferenceType |
Difference between two iterators. | |
typedef IteratorCategory | iterator_category |
The iterator category. | |
typedef ValueType | value_type |
Type of the underlying elements. | |
typedef PointerType | pointer |
Pointer return type. | |
typedef ReferenceType | reference |
Reference return type. | |
typedef DifferenceType | difference_type |
Difference between two iterators. | |
typedef IntrinsicTrait< Type > ::Type | IntrinsicType |
Intrinsic type of the elements. | |
Public Member Functions | |
Constructors | |
DenseIterator () | |
Default constructor for the DenseIterator class. | |
DenseIterator (Type *ptr) | |
Constructor for the DenseIterator class. More... | |
template<typename Other > | |
DenseIterator (const DenseIterator< Other > &it) | |
Conversion constructor from different DenseIterator instances. More... | |
Assignment operators | |
DenseIterator & | operator+= (ptrdiff_t inc) |
Addition assignment operator. More... | |
DenseIterator & | operator-= (ptrdiff_t inc) |
Subtraction assignment operator. More... | |
Increment/decrement operators | |
DenseIterator & | operator++ () |
Pre-increment operator. More... | |
const DenseIterator | operator++ (int) |
Post-increment operator. More... | |
DenseIterator & | operator-- () |
Pre-decrement operator. More... | |
const DenseIterator | operator-- (int) |
Post-decrement operator. More... | |
Access operators | |
ReferenceType | operator[] (size_t index) const |
Direct access to the underlying elements. More... | |
ReferenceType | operator* () const |
Direct access to the element at the current iterator position. More... | |
PointerType | operator-> () const |
Direct access to the element at the current iterator position. More... | |
Utility functions | |
PointerType | base () const |
Low-level access to the underlying member of the iterator. More... | |
Expression template evaluation functions | |
const IntrinsicType | load () const |
Aligned load of the intrinsic element at the current iterator position. More... | |
const IntrinsicType | loadu () const |
Unaligned load of the intrinsic element at the current iterator position. More... | |
Private Attributes | |
Member variables | |
PointerType | ptr_ |
Pointer to the current element. | |
Implementation of a generic iterator for dense vectors and matrices.
The DenseIterator represents a generic random-access iterator that can be used for dense vectors and specific rows/columns of dense matrices.
|
inlineexplicit |
Constructor for the DenseIterator class.
ptr | Pointer to the initial element. |
|
inline |
Conversion constructor from different DenseIterator instances.
it | The foreign DenseIterator instance to be copied. |
|
inline |
Low-level access to the underlying member of the iterator.
|
inline |
Aligned load of the intrinsic element at the current iterator position.
This function performs an aligned load of the intrinsic element of the current element. This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors.
|
inline |
Unaligned load of the intrinsic element at the current iterator position.
This function performs an unaligned load of the intrinsic element of the current element. This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors.
|
inline |
Direct access to the element at the current iterator position.
|
inline |
Pre-increment operator.
|
inline |
Post-increment operator.
|
inline |
Addition assignment operator.
inc | The increment of the iterator. |
|
inline |
Pre-decrement operator.
|
inline |
Post-decrement operator.
|
inline |
Subtraction assignment operator.
dec | The decrement of the iterator. |
|
inline |
Direct access to the element at the current iterator position.
|
inline |
Direct access to the underlying elements.
index | Access index. |