Argon 0.1.0
Loading...
Searching...
No Matches
argon::vectorize::load_store< ScalarType >::Iterator Struct Reference

An iterator for the vectorized view. More...

#include <load_store.hpp>

Public Types

using iterator_category = std::forward_iterator_tag
 The iterator category.
using value_type = helpers::ArgonFor_t<intrinsic_type>
 The value type of the iterator.
using difference_type = std::ptrdiff_t
 The difference type of the iterator.

Public Member Functions

 Iterator (ScalarType *ptr)
 Constructs an iterator from a pointer to the start of the range.
const value_typeoperator* () const
value_typeoperator* ()
 Dereference the iterator to get the current value.
const value_typeoperator-> () const
value_typeoperator-> ()
 Dereference the iterator to get the current value.
Iteratoroperator++ ()
 Increment the iterator to the next value.
Iterator operator++ (int)
 Postfix increment operator for the iterator.
void reload ()
 Reload the iterator with the current value.

Friends

bool operator== (const Iterator &a, const Iterator &b)
 Comparison operators for the iterator.
bool operator== (const Iterator &a, const ScalarType *ptr)
 Comparison operators for the iterator.
bool operator!= (const Iterator &a, const Iterator &b)
 Comparison operators for the iterator.
bool operator!= (const Iterator &a, const ScalarType *ptr)
 Comparison operators for the iterator.

Detailed Description

template<typename ScalarType>
struct argon::vectorize::load_store< ScalarType >::Iterator

An iterator for the vectorized view.

Constructor & Destructor Documentation

◆ Iterator()

template<typename ScalarType>
argon::vectorize::load_store< ScalarType >::Iterator::Iterator ( ScalarType * ptr)
inline

Constructs an iterator from a pointer to the start of the range.

Parameters
ptrA pointer to the start of the range.

Member Function Documentation

◆ operator*()

template<typename ScalarType>
value_type & argon::vectorize::load_store< ScalarType >::Iterator::operator* ( )
inline

Dereference the iterator to get the current value.

Returns
A reference to the current value.

◆ operator++()

template<typename ScalarType>
Iterator & argon::vectorize::load_store< ScalarType >::Iterator::operator++ ( )
inline

Increment the iterator to the next value.

Returns
A reference to the iterator itself.

◆ operator->()

template<typename ScalarType>
value_type * argon::vectorize::load_store< ScalarType >::Iterator::operator-> ( )
inline

Dereference the iterator to get the current value.

Returns
A pointer to the current value.

◆ operator!= [1/2]

template<typename ScalarType>
bool operator!= ( const Iterator & a,
const Iterator & b )
friend

Comparison operators for the iterator.

Returns
True if the iterators are not equal, false otherwise.

◆ operator!= [2/2]

template<typename ScalarType>
bool operator!= ( const Iterator & a,
const ScalarType * ptr )
friend

Comparison operators for the iterator.

Returns
True if the iterators are not equal, false otherwise.

◆ operator== [1/2]

template<typename ScalarType>
bool operator== ( const Iterator & a,
const Iterator & b )
friend

Comparison operators for the iterator.

Returns
True if the iterators are equal, false otherwise.

◆ operator== [2/2]

template<typename ScalarType>
bool operator== ( const Iterator & a,
const ScalarType * ptr )
friend

Comparison operators for the iterator.

Returns
True if the iterators are equal, false otherwise.

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