Hermes
hermes::Index3Iterator< T > Class Template Reference

Public Member Functions

HERMES_DEVICE_CALLABLE Index3Iterator (Index3< T > lower, Index3< T > upper, Index3< T > start)
 Construct a new Index3Iterator object. More...
 
HERMES_DEVICE_CALLABLE Index3Iterator (Index3< T > upper)
 
HERMES_DEVICE_CALLABLE const Index3< T > & operator* () const
 
HERMES_DEVICE_CALLABLE size_t flatIndex () const
 Computes a flat index based on size. More...
 
HERMES_DEVICE_CALLABLE Index3Iteratoroperator++ ()
 
HERMES_DEVICE_CALLABLE bool operator== (const Index3Iterator< T > &other) const
 are equal? operator More...
 
HERMES_DEVICE_CALLABLE bool operator!= (const Index3Iterator< T > &other) const
 are different? operator More...
 

Detailed Description

template<typename T>
class hermes::Index3Iterator< T >

Template Parameters
T

Constructor & Destructor Documentation

◆ Index3Iterator() [1/2]

template<typename T >
HERMES_DEVICE_CALLABLE hermes::Index3Iterator< T >::Index3Iterator ( Index3< T >  lower,
Index3< T >  upper,
Index3< T >  start 
)
inline

Construct a new Index3Iterator object.

Parameters
lower- lower bound
upper- upper bound
start- starting coordinate

◆ Index3Iterator() [2/2]

template<typename T >
HERMES_DEVICE_CALLABLE hermes::Index3Iterator< T >::Index3Iterator ( Index3< T >  upper)
inlineexplicit
Parameters
upper

Member Function Documentation

◆ flatIndex()

template<typename T >
HERMES_DEVICE_CALLABLE size_t hermes::Index3Iterator< T >::flatIndex ( ) const
inline

Computes a flat index based on size.

\f(k * (d_i * d_j) + j * d_i + i\f)

where \f(d = upper - lower\f)

Returns

◆ operator!=()

template<typename T >
HERMES_DEVICE_CALLABLE bool hermes::Index3Iterator< T >::operator!= ( const Index3Iterator< T > &  other) const
inline

are different? operator

Parameters
other-
Returns
bool true if current indices are different

◆ operator*()

template<typename T >
HERMES_DEVICE_CALLABLE const Index3<T>& hermes::Index3Iterator< T >::operator* ( ) const
inline
Returns
const Index3<T>& current index coordinate

◆ operator++()

template<typename T >
HERMES_DEVICE_CALLABLE Index3Iterator& hermes::Index3Iterator< T >::operator++ ( )
inline
Returns
Index3Iterator&

◆ operator==()

template<typename T >
HERMES_DEVICE_CALLABLE bool hermes::Index3Iterator< T >::operator== ( const Index3Iterator< T > &  other) const
inline

are equal? operator

Parameters
other-
Returns
bool true if current indices are equal

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