Fermat
Public Types | Public Methods | Public Members | List of all members
cugar::strided_iterator< T > Struct Template Reference

Detailed description

template<typename T>
struct cugar::strided_iterator< T >

Wrapper class to create a strided iterator out of another base iterator, i.e:

it[ j ] = base[ j * stride ]

#include <strided_iterator.h>

Public Types

typedef std::iterator_traits< T >::value_type value_type
 
typedef std::iterator_traits< T >::reference reference
 
typedef to_const< reference >::type const_reference
 
typedef std::iterator_traits< T >::pointer pointer
 
typedef std::iterator_traits< T >::difference_type difference_type
 
typedef std::iterator_traits< T >::iterator_category iterator_category
 

Public Methods

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE strided_iterator ()
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE strided_iterator (T vec, const uint32 stride)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE const_reference operator* () const
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE reference operator* ()
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE const_reference operator[] (const uint32 i) const
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE reference operator[] (const uint32 i)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE strided_iterator< T > operator+ (const uint32 i) const
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE difference_type operator- (const strided_iterator< T > it) const
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE strided_iterator< T > & operator++ ()
 

Public Members

m_vec
 
uint32 m_stride
 

Constructor & Destructor Documentation

◆ strided_iterator() [1/2]

template<typename T>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE cugar::strided_iterator< T >::strided_iterator ( )
inline

constructor

◆ strided_iterator() [2/2]

template<typename T>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE cugar::strided_iterator< T >::strided_iterator ( vec,
const uint32  stride 
)
inline

constructor

Member Function Documentation

◆ operator*() [1/2]

template<typename T>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE const_reference cugar::strided_iterator< T >::operator* ( ) const
inline

const dereferencing operator

◆ operator*() [2/2]

template<typename T>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE reference cugar::strided_iterator< T >::operator* ( )
inline

dereferencing operator

◆ operator+()

template<typename T>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE strided_iterator<T> cugar::strided_iterator< T >::operator+ ( const uint32  i) const
inline

addition

◆ operator++()

template<typename T>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE strided_iterator<T>& cugar::strided_iterator< T >::operator++ ( )
inline

pre-increment

◆ operator-()

template<typename T>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE difference_type cugar::strided_iterator< T >::operator- ( const strided_iterator< T >  it) const
inline

iterator subtraction

◆ operator[]() [1/2]

template<typename T>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE const_reference cugar::strided_iterator< T >::operator[] ( const uint32  i) const
inline

const indexing operator

◆ operator[]() [2/2]

template<typename T>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE reference cugar::strided_iterator< T >::operator[] ( const uint32  i)
inline

indexing operator


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