Low-Level Abstraction of Memory Access
llama::Iterator< View > Struct Template Reference

#include <View.hpp>

+ Collaboration diagram for llama::Iterator< View >:

Public Types

using ArrayIndexIterator = llama::ArrayIndexIterator< typename View::ArrayExtents >
 
using iterator_category = std::random_access_iterator_tag
 
using value_type = One< typename View::RecordDim >
 
using difference_type = typename ArrayIndexIterator::difference_type
 
using pointer = internal::IndirectValue< RecordRef< View > >
 
using reference = RecordRef< View >
 

Public Member Functions

constexpr Iterator ()=default
 
constexpr Iterator (ArrayIndexIterator arrayIndex, View *view)
 
constexpr auto operator++ () -> Iterator &
 
constexpr auto operator++ (int) -> Iterator
 
constexpr auto operator-- () -> Iterator &
 
constexpr auto operator-- (int) -> Iterator
 
constexpr auto operator* () const -> reference
 
constexpr auto operator-> () const -> pointer
 
constexpr auto operator[] (difference_type i) const -> reference
 
constexpr auto operator+= (difference_type n) -> Iterator &
 
constexpr auto operator-= (difference_type n) -> Iterator &
 

Public Attributes

ArrayIndexIterator arrayIndex
 
Viewview
 

Friends

constexpr friend auto operator+ (Iterator it, difference_type n) -> Iterator
 
constexpr friend auto operator+ (difference_type n, Iterator it) -> Iterator
 
constexpr friend auto operator- (Iterator it, difference_type n) -> Iterator
 
constexpr friend auto operator- (const Iterator &a, const Iterator &b) -> difference_type
 
constexpr friend auto operator== (const Iterator &a, const Iterator &b) -> bool
 
constexpr friend auto operator!= (const Iterator &a, const Iterator &b) -> bool
 
constexpr friend auto operator< (const Iterator &a, const Iterator &b) -> bool
 
constexpr friend auto operator> (const Iterator &a, const Iterator &b) -> bool
 
constexpr friend auto operator<= (const Iterator &a, const Iterator &b) -> bool
 
constexpr friend auto operator>= (const Iterator &a, const Iterator &b) -> bool
 

Detailed Description

template<typename View>
struct llama::Iterator< View >

Definition at line 205 of file View.hpp.

Member Typedef Documentation

◆ ArrayIndexIterator

Definition at line 207 of file View.hpp.

◆ difference_type

template<typename View >
using llama::Iterator< View >::difference_type = typename ArrayIndexIterator::difference_type

Definition at line 211 of file View.hpp.

◆ iterator_category

template<typename View >
using llama::Iterator< View >::iterator_category = std::random_access_iterator_tag

Definition at line 209 of file View.hpp.

◆ pointer

template<typename View >
using llama::Iterator< View >::pointer = internal::IndirectValue<RecordRef<View> >

Definition at line 212 of file View.hpp.

◆ reference

template<typename View >
using llama::Iterator< View >::reference = RecordRef<View>

Definition at line 213 of file View.hpp.

◆ value_type

template<typename View >
using llama::Iterator< View >::value_type = One<typename View::RecordDim>

Definition at line 210 of file View.hpp.

Constructor & Destructor Documentation

◆ Iterator() [1/2]

template<typename View >
constexpr llama::Iterator< View >::Iterator ( )
constexprdefault

◆ Iterator() [2/2]

template<typename View >
constexpr llama::Iterator< View >::Iterator ( ArrayIndexIterator< View arrayIndex,
View view 
)
inlineconstexpr

Definition at line 217 of file View.hpp.

Member Function Documentation

◆ operator*()

template<typename View >
constexpr auto llama::Iterator< View >::operator* ( ) const -> reference
inlineconstexpr

Definition at line 254 of file View.hpp.

◆ operator++() [1/2]

template<typename View >
constexpr auto llama::Iterator< View >::operator++ ( ) -> Iterator&
inlineconstexpr

Definition at line 224 of file View.hpp.

◆ operator++() [2/2]

template<typename View >
constexpr auto llama::Iterator< View >::operator++ ( int  ) -> Iterator
inlineconstexpr

Definition at line 231 of file View.hpp.

◆ operator+=()

template<typename View >
constexpr auto llama::Iterator< View >::operator+= ( difference_type  n) -> Iterator&
inlineconstexpr

Definition at line 272 of file View.hpp.

◆ operator--() [1/2]

template<typename View >
constexpr auto llama::Iterator< View >::operator-- ( ) -> Iterator&
inlineconstexpr

Definition at line 239 of file View.hpp.

◆ operator--() [2/2]

template<typename View >
constexpr auto llama::Iterator< View >::operator-- ( int  ) -> Iterator
inlineconstexpr

Definition at line 246 of file View.hpp.

◆ operator-=()

template<typename View >
constexpr auto llama::Iterator< View >::operator-= ( difference_type  n) -> Iterator&
inlineconstexpr

Definition at line 292 of file View.hpp.

◆ operator->()

template<typename View >
constexpr auto llama::Iterator< View >::operator-> ( ) const -> pointer
inlineconstexpr

Definition at line 260 of file View.hpp.

◆ operator[]()

template<typename View >
constexpr auto llama::Iterator< View >::operator[] ( difference_type  i) const -> reference
inlineconstexpr

Definition at line 266 of file View.hpp.

Friends And Related Function Documentation

◆ operator!=

template<typename View >
constexpr friend auto operator!= ( const Iterator< View > &  a,
const Iterator< View > &  b 
) -> bool
friend

Definition at line 320 of file View.hpp.

◆ operator+ [1/2]

template<typename View >
constexpr friend auto operator+ ( difference_type  n,
Iterator< View it 
) -> Iterator
friend

Definition at line 286 of file View.hpp.

◆ operator+ [2/2]

template<typename View >
constexpr friend auto operator+ ( Iterator< View it,
difference_type  n 
) -> Iterator
friend

Definition at line 279 of file View.hpp.

◆ operator- [1/2]

template<typename View >
constexpr friend auto operator- ( const Iterator< View > &  a,
const Iterator< View > &  b 
) -> difference_type
friend

Definition at line 306 of file View.hpp.

◆ operator- [2/2]

template<typename View >
constexpr friend auto operator- ( Iterator< View it,
difference_type  n 
) -> Iterator
friend

Definition at line 299 of file View.hpp.

◆ operator<

template<typename View >
constexpr friend auto operator< ( const Iterator< View > &  a,
const Iterator< View > &  b 
) -> bool
friend

Definition at line 326 of file View.hpp.

◆ operator<=

template<typename View >
constexpr friend auto operator<= ( const Iterator< View > &  a,
const Iterator< View > &  b 
) -> bool
friend

Definition at line 339 of file View.hpp.

◆ operator==

template<typename View >
constexpr friend auto operator== ( const Iterator< View > &  a,
const Iterator< View > &  b 
) -> bool
friend

Definition at line 313 of file View.hpp.

◆ operator>

template<typename View >
constexpr friend auto operator> ( const Iterator< View > &  a,
const Iterator< View > &  b 
) -> bool
friend

Definition at line 333 of file View.hpp.

◆ operator>=

template<typename View >
constexpr friend auto operator>= ( const Iterator< View > &  a,
const Iterator< View > &  b 
) -> bool
friend

Definition at line 345 of file View.hpp.

Member Data Documentation

◆ arrayIndex

template<typename View >
ArrayIndexIterator llama::Iterator< View >::arrayIndex

Definition at line 350 of file View.hpp.

◆ view

template<typename View >
View* llama::Iterator< View >::view

Definition at line 351 of file View.hpp.


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