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 525 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 530 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 528 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 531 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 532 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 529 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 534 of file KokkosArray.h.

534 : 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 535 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 539 of file KokkosArray.h.

539 { 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 537 of file KokkosArray.h.

537 { 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 540 of file KokkosArray.h.

541  {
542  ++it;
543  return *this;
544  }

◆ 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 545 of file KokkosArray.h.

546  {
547  iterator pre = *this;
548  ++it;
549  return pre;
550  }

◆ 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 538 of file KokkosArray.h.

538 { 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 555 of file KokkosArray.h.

556  {
557  return a.it != b.it;
558  }

◆ 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 551 of file KokkosArray.h.

552  {
553  return a.it == b.it;
554  }

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: