Template Numerical Library version\ main:4e58ea6
|
Iterator for iterating over elements of a segment. More...
#include <TNL/Algorithms/Segments/SegmentViewIterator.h>
Public Types | |
using | IndexType = typename SegmentViewType::IndexType |
The type used for matrix elements indexing. | |
using | SegmentElementType = SegmentElement< IndexType > |
The type of related matrix element. | |
using | SegmentViewType = SegmentView |
Type of SegmentView. | |
Public Member Functions | |
__cuda_callable__ | SegmentViewIterator (const SegmentViewType &segmentView, IndexType localIdx) |
__cuda_callable__ bool | operator!= (const SegmentViewIterator &other) const |
Comparison of two matrix Segment iterators. | |
__cuda_callable__ SegmentElementType | operator* () const |
Operator for derefrencing the iterator. | |
__cuda_callable__ SegmentViewIterator & | operator++ () |
Operator for incrementing the iterator, i.e. moving to the next element. | |
__cuda_callable__ SegmentViewIterator & | operator-- () |
Operator for decrementing the iterator, i.e. moving to the previous element. | |
__cuda_callable__ bool | operator== (const SegmentViewIterator &other) const |
Comparison of two matrix Segment iterators. | |
Protected Attributes | |
IndexType | localIdx = 0 |
const SegmentViewType & | segmentView |
Iterator for iterating over elements of a segment.
The iterator can be used even in GPU kernels.
SegmentView | is a type of related segment view. |
|
nodiscard |
Comparison of two matrix Segment iterators.
other | is another matrix Segment iterator. |
|
nodiscard |
Operator for derefrencing the iterator.
It returns structure SegmentElementType which represent one element of a segment.
__cuda_callable__ SegmentViewIterator< SegmentView > & TNL::Algorithms::Segments::SegmentViewIterator< SegmentView >::operator++ | ( | ) |
Operator for incrementing the iterator, i.e. moving to the next element.
__cuda_callable__ SegmentViewIterator< SegmentView > & TNL::Algorithms::Segments::SegmentViewIterator< SegmentView >::operator-- | ( | ) |
Operator for decrementing the iterator, i.e. moving to the previous element.
|
nodiscard |
Comparison of two matrix Segment iterators.
other | is another matrix Segment iterator. |