![]() |
Blaze
3.6
|
Implementation of a generic iterator for uniform vectors and matrices.The UniformIterator represents a generic random-access iterator that can be used for uniform vectors and specific rows/columns of uniform matrices. More...
#include <UniformIterator.h>
Public Types | |
using | IteratorCategory = std::random_access_iterator_tag |
The iterator category. | |
using | ValueType = Type |
Type of the underlying elements. | |
using | PointerType = Type * |
Pointer return type. | |
using | ReferenceType = Type & |
Reference return type. | |
using | DifferenceType = ptrdiff_t |
Difference between two iterators. | |
using | iterator_category = IteratorCategory |
The iterator category. | |
using | value_type = ValueType |
Type of the underlying elements. | |
using | pointer = PointerType |
Pointer return type. | |
using | reference = ReferenceType |
Reference return type. | |
using | difference_type = DifferenceType |
Difference between two iterators. | |
using | SIMDType = SIMDTrait_t< Type > |
SIMD type of the elements. | |
Public Member Functions | |
Constructors | |
constexpr | UniformIterator () noexcept |
Default constructor for the UniformIterator class. | |
constexpr | UniformIterator (Type *ptr, size_t index) noexcept |
Constructor for the UniformIterator class. More... | |
template<typename Other , bool AF2> | |
constexpr | UniformIterator (const UniformIterator< Other, AF2 > &it) noexcept |
Conversion constructor from different UniformIterator instances. More... | |
UniformIterator (const UniformIterator &)=default | |
Destructor | |
~UniformIterator ()=default | |
Assignment operators | |
constexpr UniformIterator & | operator+= (ptrdiff_t inc) noexcept |
Addition assignment operator. More... | |
constexpr UniformIterator & | operator-= (ptrdiff_t inc) noexcept |
Subtraction assignment operator. More... | |
UniformIterator & | operator= (const UniformIterator &)=default |
Increment/decrement operators | |
constexpr UniformIterator & | operator++ () noexcept |
Pre-increment operator. More... | |
constexpr const UniformIterator | operator++ (int) noexcept |
Post-increment operator. More... | |
constexpr UniformIterator & | operator-- () noexcept |
Pre-decrement operator. More... | |
constexpr const UniformIterator | operator-- (int) noexcept |
Post-decrement operator. More... | |
Access operators | |
constexpr ReferenceType | operator[] (size_t index) const noexcept |
Direct access to the underlying elements. More... | |
constexpr ReferenceType | operator * () const noexcept |
Direct access to the element at the current iterator position. More... | |
constexpr PointerType | operator-> () const noexcept |
Direct access to the element at the current iterator position. More... | |
Utility functions | |
constexpr PointerType | ptr () const noexcept |
Low-level access to the current memory location of the iterator. More... | |
constexpr size_t | idx () const noexcept |
Low-level access to the underlying index of the iterator. More... | |
Expression template evaluation functions | |
const SIMDType | load () const noexcept |
Load of the SIMD element at the current iterator position. More... | |
const SIMDType | loada () const noexcept |
Aligned load of the SIMD element at the current iterator position. More... | |
const SIMDType | loadu () const noexcept |
Unaligned load of the SIMD element at the current iterator position. More... | |
Private Attributes | |
Member variables | |
PointerType | ptr_ |
Pointer to the element. | |
size_t | index_ |
Index of the current element. | |
Implementation of a generic iterator for uniform vectors and matrices.
The UniformIterator represents a generic random-access iterator that can be used for uniform vectors and specific rows/columns of uniform matrices.
|
inlineexplicitnoexcept |
Constructor for the UniformIterator class.
ptr | Pointer to the element. |
index | The index of the initial element. |
|
inlinenoexcept |
Conversion constructor from different UniformIterator instances.
it | The foreign UniformIterator instance to be copied. |
|
inlinenoexcept |
Low-level access to the underlying index of the iterator.
|
inlinenoexcept |
Load of the SIMD element at the current iterator position.
This function performs a load of the SIMD 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.
|
inlinenoexcept |
Aligned load of the SIMD element at the current iterator position.
This function performs an aligned load of the SIMD 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.
|
inlinenoexcept |
Unaligned load of the SIMD element at the current iterator position.
This function performs an unaligned load of the SIMD 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.
|
inlinenoexcept |
Direct access to the element at the current iterator position.
|
inlinenoexcept |
Pre-increment operator.
|
inlinenoexcept |
Post-increment operator.
|
inlinenoexcept |
Addition assignment operator.
inc | The increment of the iterator. |
|
inlinenoexcept |
Pre-decrement operator.
|
inlinenoexcept |
Post-decrement operator.
|
inlinenoexcept |
Subtraction assignment operator.
dec | The decrement of the iterator. |
|
inlinenoexcept |
Direct access to the element at the current iterator position.
|
inlinenoexcept |
Direct access to the underlying elements.
index | Access index. |
|
inlinenoexcept |
Low-level access to the current memory location of the iterator.