Hermes
hermes::Index2Iterator< T > Class Template Reference

Public Member Functions

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

Detailed Description

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

Template Parameters
T

Constructor & Destructor Documentation

◆ Index2Iterator() [1/2]

template<typename T >
HERMES_DEVICE_CALLABLE hermes::Index2Iterator< T >::Index2Iterator ( Index2< T >  lower,
Index2< T >  upper 
)
inline

Constructor.

Parameters
lower
upper

◆ Index2Iterator() [2/2]

template<typename T >
HERMES_DEVICE_CALLABLE hermes::Index2Iterator< T >::Index2Iterator ( Index2< T >  lower,
Index2< T >  upper,
Index2< T >  start 
)
inline

Construct a new Index2Iterator object.

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

Member Function Documentation

◆ flatIndex()

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

Computes a flat index based on size.

\f(j * (upper - lower)_i + i\f)

Returns

◆ operator!=()

template<typename T >
HERMES_DEVICE_CALLABLE bool hermes::Index2Iterator< T >::operator!= ( const Index2Iterator< 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 Index2<T>& hermes::Index2Iterator< T >::operator* ( ) const
inline
Returns
const Index2<T>& current index coordinate

◆ operator++()

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

◆ operator==()

template<typename T >
HERMES_DEVICE_CALLABLE bool hermes::Index2Iterator< T >::operator== ( const Index2Iterator< 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: