Template Numerical Library: TNL::Algorithms::Segments::SegmentViewIterator< SegmentView > Class Template Reference

Template Numerical Library version\ main:be7e16d88

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
TNL::Algorithms::Segments::SegmentViewIterator< SegmentView > Class Template Reference

Iterator for iterating over elements of a segment. More...

`#include <TNL/Algorithms/Segments/SegmentViewIterator.h>`

Collaboration diagram for TNL::Algorithms::Segments::SegmentViewIterator< SegmentView >:
[legend]

## 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

## Detailed Description

template<typename SegmentView>
class TNL::Algorithms::Segments::SegmentViewIterator< SegmentView >

Iterator for iterating over elements of a segment.

The iterator can be used even in GPU kernels.

Template Parameters

  SegmentView | is a type of related segment view.

## Member Function Documentation

## ◆ operator!=()

template<typename SegmentView>

__cuda_callable__ bool TNL::Algorithms::Segments::SegmentViewIterator< SegmentView >::operator!= | ( | const SegmentViewIterator< SegmentView > & | other | ) | const
| nodiscard

Comparison of two matrix Segment iterators.

Parameters

  other | is another matrix Segment iterator.

Returns
  false if both iterators points at the same point of the same matrix, true otherwise.

## ◆ operator*()

template<typename SegmentView>

__cuda_callable__ SegmentElementType TNL::Algorithms::Segments::SegmentViewIterator< SegmentView >::operator* | ( |  | ) | const
| nodiscard

Operator for derefrencing the iterator.

It returns structure SegmentElementType which represent one element of a segment.

Returns
  segment element the iterator points to.

## ◆ operator++()

template<typename SegmentView>

__cuda_callable__ SegmentViewIterator & TNL::Algorithms::Segments::SegmentViewIterator< SegmentView >::operator++ | ( |  | ) |

Operator for incrementing the iterator, i.e. moving to the next element.

Returns
  reference to this iterator.

## ◆ operator--()

template<typename SegmentView>

__cuda_callable__ SegmentViewIterator & TNL::Algorithms::Segments::SegmentViewIterator< SegmentView >::operator-- | ( |  | ) |

Operator for decrementing the iterator, i.e. moving to the previous element.

Returns
  reference to this iterator.

## ◆ operator==()

template<typename SegmentView>

__cuda_callable__ bool TNL::Algorithms::Segments::SegmentViewIterator< SegmentView >::operator== | ( | const SegmentViewIterator< SegmentView > & | other | ) | const
| nodiscard

Comparison of two matrix Segment iterators.

Parameters

  other | is another matrix Segment iterator.

Returns
  true if both iterators points at the same point of the same matrix, false otherwise.

The documentation for this class was generated from the following file:

- src/TNL/Algorithms/Segments/SegmentViewIterator.h