HOPS
HOPS class reference
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
hops::MHO_BidirectionalIndexedIterator< XValueType, RANK > Class Template Reference

Class MHO_BidirectionalIndexedIterator. More...

#include <MHO_BidirectionalIndexedIterator.hh>

Public Types

typedef std::ptrdiff_t difference_type
 
typedef std::array< std::size_t, RANK > index_type
 
typedef std::bidirectional_iterator_tag iterator_category
 
typedef XValueType * pointer
 
typedef XValueType & reference
 
typedef MHO_BidirectionalIndexedIterator self_type
 
typedef XValueType value_type
 

Public Member Functions

 MHO_BidirectionalIndexedIterator (const self_type &copy)
 
 MHO_BidirectionalIndexedIterator (pointer begin_ptr, std::size_t position_offset, const std::size_t *dims, const std::size_t *strides)
 
virtual ~MHO_BidirectionalIndexedIterator ()
 
difference_type GetMemoryOffset () const
 
difference_type GetPositionOffset () const
 
pointer GetPtr ()
 
const pointer GetPtr () const
 
bool IsValid () const
 
bool operator!= (const self_type &rhs) const
 
reference operator* ()
 
reference operator* () const
 
self_type operator+ (const std::ptrdiff_t &diff)
 
self_type operator++ ()
 
self_type operator++ (int)
 
self_type operator+= (const std::ptrdiff_t &diff)
 
difference_type operator- (const self_type &iter)
 
self_type operator- (const std::ptrdiff_t &diff)
 
self_type operator-- ()
 
self_type operator-- (int)
 
self_type operator-= (const std::ptrdiff_t &diff)
 
pointer operator-> ()
 
const pointer operator-> () const
 
self_type operator= (const self_type &rhs)
 
bool operator== (const self_type &rhs) const
 

Protected Member Functions

void CalculateOffsets ()
 

Protected Attributes

pointer fBegin
 
index_type fDimensions
 
index_type fIdx
 
std::size_t fLength
 
std::size_t fMemoryOffset
 
std::size_t fPositionOffset
 
pointer fPtr
 
index_type fStrides
 

Detailed Description

template<typename XValueType, std::size_t RANK>
class hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >

Class MHO_BidirectionalIndexedIterator.

This is an iterator for more complicated n-darrays (primarily array "slices"). Because we cannot guarantee that adjacent elements (in index space) are contiguous in memory for an array slice, we need to ensure that the proper strided access takes place.

Author
J. Barrett - barre.nosp@m.ttj@.nosp@m.mit.e.nosp@m.du
Date
Tue Mar 29 21:13:12 2022 -0400

Member Typedef Documentation

◆ difference_type

template<typename XValueType , std::size_t RANK>
typedef std::ptrdiff_t hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::difference_type

◆ index_type

template<typename XValueType , std::size_t RANK>
typedef std::array< std::size_t, RANK > hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::index_type

◆ iterator_category

template<typename XValueType , std::size_t RANK>
typedef std::bidirectional_iterator_tag hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::iterator_category

◆ pointer

template<typename XValueType , std::size_t RANK>
typedef XValueType* hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::pointer

◆ reference

template<typename XValueType , std::size_t RANK>
typedef XValueType& hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::reference

◆ self_type

template<typename XValueType , std::size_t RANK>
typedef MHO_BidirectionalIndexedIterator hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::self_type

◆ value_type

template<typename XValueType , std::size_t RANK>
typedef XValueType hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::value_type

Constructor & Destructor Documentation

◆ MHO_BidirectionalIndexedIterator() [1/2]

template<typename XValueType , std::size_t RANK>
hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::MHO_BidirectionalIndexedIterator ( pointer  begin_ptr,
std::size_t  position_offset,
const std::size_t *  dims,
const std::size_t *  strides 
)
inline

◆ MHO_BidirectionalIndexedIterator() [2/2]

template<typename XValueType , std::size_t RANK>
hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::MHO_BidirectionalIndexedIterator ( const self_type copy)
inline

◆ ~MHO_BidirectionalIndexedIterator()

template<typename XValueType , std::size_t RANK>
virtual hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::~MHO_BidirectionalIndexedIterator ( )
inlinevirtual

Member Function Documentation

◆ CalculateOffsets()

template<typename XValueType , std::size_t RANK>
void hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::CalculateOffsets ( )
inlineprotected

◆ GetMemoryOffset()

template<typename XValueType , std::size_t RANK>
difference_type hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::GetMemoryOffset ( ) const
inline

◆ GetPositionOffset()

template<typename XValueType , std::size_t RANK>
difference_type hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::GetPositionOffset ( ) const
inline

◆ GetPtr() [1/2]

template<typename XValueType , std::size_t RANK>
pointer hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::GetPtr ( )
inline

◆ GetPtr() [2/2]

template<typename XValueType , std::size_t RANK>
const pointer hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::GetPtr ( ) const
inline

◆ IsValid()

template<typename XValueType , std::size_t RANK>
bool hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::IsValid ( ) const
inline

◆ operator!=()

template<typename XValueType , std::size_t RANK>
bool hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::operator!= ( const self_type rhs) const
inline

◆ operator*() [1/2]

template<typename XValueType , std::size_t RANK>
reference hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::operator* ( )
inline

◆ operator*() [2/2]

template<typename XValueType , std::size_t RANK>
reference hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::operator* ( ) const
inline

◆ operator+()

template<typename XValueType , std::size_t RANK>
self_type hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::operator+ ( const std::ptrdiff_t &  diff)
inline

◆ operator++() [1/2]

template<typename XValueType , std::size_t RANK>
self_type hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::operator++ ( )
inline

◆ operator++() [2/2]

template<typename XValueType , std::size_t RANK>
self_type hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::operator++ ( int  )
inline

◆ operator+=()

template<typename XValueType , std::size_t RANK>
self_type hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::operator+= ( const std::ptrdiff_t &  diff)
inline

◆ operator-() [1/2]

template<typename XValueType , std::size_t RANK>
difference_type hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::operator- ( const self_type iter)
inline

◆ operator-() [2/2]

template<typename XValueType , std::size_t RANK>
self_type hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::operator- ( const std::ptrdiff_t &  diff)
inline

◆ operator--() [1/2]

template<typename XValueType , std::size_t RANK>
self_type hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::operator-- ( )
inline

◆ operator--() [2/2]

template<typename XValueType , std::size_t RANK>
self_type hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::operator-- ( int  )
inline

◆ operator-=()

template<typename XValueType , std::size_t RANK>
self_type hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::operator-= ( const std::ptrdiff_t &  diff)
inline

◆ operator->() [1/2]

template<typename XValueType , std::size_t RANK>
pointer hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::operator-> ( )
inline

◆ operator->() [2/2]

template<typename XValueType , std::size_t RANK>
const pointer hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::operator-> ( ) const
inline

◆ operator=()

template<typename XValueType , std::size_t RANK>
self_type hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::operator= ( const self_type rhs)
inline

◆ operator==()

template<typename XValueType , std::size_t RANK>
bool hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::operator== ( const self_type rhs) const
inline

Member Data Documentation

◆ fBegin

template<typename XValueType , std::size_t RANK>
pointer hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::fBegin
protected

◆ fDimensions

template<typename XValueType , std::size_t RANK>
index_type hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::fDimensions
protected

◆ fIdx

template<typename XValueType , std::size_t RANK>
index_type hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::fIdx
protected

◆ fLength

template<typename XValueType , std::size_t RANK>
std::size_t hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::fLength
protected

◆ fMemoryOffset

template<typename XValueType , std::size_t RANK>
std::size_t hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::fMemoryOffset
protected

◆ fPositionOffset

template<typename XValueType , std::size_t RANK>
std::size_t hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::fPositionOffset
protected

◆ fPtr

template<typename XValueType , std::size_t RANK>
pointer hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::fPtr
protected

◆ fStrides

template<typename XValueType , std::size_t RANK>
index_type hops::MHO_BidirectionalIndexedIterator< XValueType, RANK >::fStrides
protected

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