https://mooseframework.inl.gov
Public Types | Public Member Functions | Private Attributes | Friends | List of all members
Moose::Kokkos::ArrayBase< T, dimension, index_type >::iterator Class Reference

Array iterator. More...

#include <KokkosArray.h>

Public Types

using iterator_category = std::forward_iterator_tag
 
using value_type = T
 
using difference_type = std::ptrdiff_t
 
using pointer = T *
 
using reference = T &
 

Public Member Functions

KOKKOS_FUNCTION iterator ()
 
KOKKOS_FUNCTION iterator (T *p)
 
KOKKOS_FUNCTION reference operator* () const
 
KOKKOS_FUNCTION pointer operator-> () const
 
KOKKOS_FUNCTION pointer operator & () const
 
KOKKOS_FUNCTION iteratoroperator++ ()
 
KOKKOS_FUNCTION iterator operator++ (int)
 

Private Attributes

pointer it
 

Friends

KOKKOS_FUNCTION friend bool operator== (const iterator &a, const iterator &b)
 
KOKKOS_FUNCTION friend bool operator!= (const iterator &a, const iterator &b)
 

Detailed Description

template<typename T, unsigned int dimension, typename index_type>
class Moose::Kokkos::ArrayBase< T, dimension, index_type >::iterator

Array iterator.

Definition at line 436 of file KokkosArray.h.

Member Typedef Documentation

◆ difference_type

template<typename T, unsigned int dimension, typename index_type>
using Moose::Kokkos::ArrayBase< T, dimension, index_type >::iterator::difference_type = std::ptrdiff_t

Definition at line 441 of file KokkosArray.h.

◆ iterator_category

template<typename T, unsigned int dimension, typename index_type>
using Moose::Kokkos::ArrayBase< T, dimension, index_type >::iterator::iterator_category = std::forward_iterator_tag

Definition at line 439 of file KokkosArray.h.

◆ pointer

template<typename T, unsigned int dimension, typename index_type>
using Moose::Kokkos::ArrayBase< T, dimension, index_type >::iterator::pointer = T *

Definition at line 442 of file KokkosArray.h.

◆ reference

template<typename T, unsigned int dimension, typename index_type>
using Moose::Kokkos::ArrayBase< T, dimension, index_type >::iterator::reference = T &

Definition at line 443 of file KokkosArray.h.

◆ value_type

template<typename T, unsigned int dimension, typename index_type>
using Moose::Kokkos::ArrayBase< T, dimension, index_type >::iterator::value_type = T

Definition at line 440 of file KokkosArray.h.

Constructor & Destructor Documentation

◆ iterator() [1/2]

template<typename T, unsigned int dimension, typename index_type>
KOKKOS_FUNCTION Moose::Kokkos::ArrayBase< T, dimension, index_type >::iterator::iterator ( )
inline

Definition at line 445 of file KokkosArray.h.

445 : it(nullptr) {}

◆ iterator() [2/2]

template<typename T, unsigned int dimension, typename index_type>
KOKKOS_FUNCTION Moose::Kokkos::ArrayBase< T, dimension, index_type >::iterator::iterator ( T *  p)
inlineexplicit

Definition at line 446 of file KokkosArray.h.

Member Function Documentation

◆ operator &()

template<typename T, unsigned int dimension, typename index_type>
KOKKOS_FUNCTION pointer Moose::Kokkos::ArrayBase< T, dimension, index_type >::iterator::operator& ( ) const
inline

Definition at line 450 of file KokkosArray.h.

450 { return it; }

◆ operator*()

template<typename T, unsigned int dimension, typename index_type>
KOKKOS_FUNCTION reference Moose::Kokkos::ArrayBase< T, dimension, index_type >::iterator::operator* ( ) const
inline

Definition at line 448 of file KokkosArray.h.

448 { return *it; }

◆ operator++() [1/2]

template<typename T, unsigned int dimension, typename index_type>
KOKKOS_FUNCTION iterator& Moose::Kokkos::ArrayBase< T, dimension, index_type >::iterator::operator++ ( )
inline

Definition at line 451 of file KokkosArray.h.

452  {
453  ++it;
454  return *this;
455  }

◆ operator++() [2/2]

template<typename T, unsigned int dimension, typename index_type>
KOKKOS_FUNCTION iterator Moose::Kokkos::ArrayBase< T, dimension, index_type >::iterator::operator++ ( int  )
inline

Definition at line 456 of file KokkosArray.h.

457  {
458  iterator pre = *this;
459  ++it;
460  return pre;
461  }

◆ operator->()

template<typename T, unsigned int dimension, typename index_type>
KOKKOS_FUNCTION pointer Moose::Kokkos::ArrayBase< T, dimension, index_type >::iterator::operator-> ( ) const
inline

Definition at line 449 of file KokkosArray.h.

449 { return it; }

Friends And Related Function Documentation

◆ operator!=

template<typename T, unsigned int dimension, typename index_type>
KOKKOS_FUNCTION friend bool operator!= ( const iterator a,
const iterator b 
)
friend

Definition at line 466 of file KokkosArray.h.

467  {
468  return a.it != b.it;
469  }

◆ operator==

template<typename T, unsigned int dimension, typename index_type>
KOKKOS_FUNCTION friend bool operator== ( const iterator a,
const iterator b 
)
friend

Definition at line 462 of file KokkosArray.h.

463  {
464  return a.it == b.it;
465  }

Member Data Documentation

◆ it

template<typename T, unsigned int dimension, typename index_type>
pointer Moose::Kokkos::ArrayBase< T, dimension, index_type >::iterator::it
private

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