Fermat
|
Wrapper class to create a block-strided iterator out of another base iterator, i.e:
it[ j ] = base[ (j / BLOCKSIZE) * stride + (j %% BLOCKSIZE) ]
or:
it[ j ] = base[ (j %% BLOCKSIZE) * stride + (j / BLOCKSIZE) ]
depending on whether the alignment is ROW_MAJOR or COLUMN_MAJOR
#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 | block_strided_iterator () |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE | block_strided_iterator (T vec, const uint32 stride, const uint32 offset=0) |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE const_reference | operator* () const |
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 block_strided_iterator< BLOCKSIZE, T > | operator+ (const uint32 i) const |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE difference_type | operator- (const block_strided_iterator< BLOCKSIZE, T > it) const |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE block_strided_iterator< BLOCKSIZE, T > & | operator++ () |
Public Members | |
T | m_vec |
uint32 | m_offset |
uint32 | m_stride |
|
inline |
constructor
|
inline |
constructor
|
inline |
const dereferencing operator
|
inline |
addition
|
inline |
pre-increment
|
inline |
iterator subtraction
|
inline |
const indexing operator
|
inline |
indexing operator