NVBIO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Methods | Public Members | List of all members
nvbio::block_strided_iterator< BLOCKSIZE, T, LAYOUT > Struct Template Reference

Detailed description

template< uint32 BLOCKSIZE, typename T, block_strided_layout LAYOUT = ROW_MAJOR_LAYOUT>
struct nvbio::block_strided_iterator< BLOCKSIZE, T, LAYOUT >

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

Definition at line 193 of file strided_iterator.h.

#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

NVBIO_FORCEINLINE NVBIO_HOST_DEVICE block_strided_iterator ()
 
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE block_strided_iterator (T vec, const uint32 stride, const uint32 offset=0)
 
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE
const_reference 
operator* () const
 
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE
const_reference 
operator[] (const uint32 i) const
 
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE reference 
operator[] (const uint32 i)
 
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE
block_strided_iterator
< BLOCKSIZE, T > 
operator+ (const uint32 i) const
 
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE
difference_type 
operator- (const block_strided_iterator< BLOCKSIZE, T > it) const
 
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE
block_strided_iterator
< BLOCKSIZE, T > & 
operator++ ()
 

Public Members

m_vec
 
uint32 m_offset
 
uint32 m_stride
 

Member Typedef Documentation

template<uint32 BLOCKSIZE, typename T, block_strided_layout LAYOUT = ROW_MAJOR_LAYOUT>
typedef to_const<reference>::type nvbio::block_strided_iterator< BLOCKSIZE, T, LAYOUT >::const_reference

Definition at line 197 of file strided_iterator.h.

template<uint32 BLOCKSIZE, typename T, block_strided_layout LAYOUT = ROW_MAJOR_LAYOUT>
typedef std::iterator_traits<T>::difference_type nvbio::block_strided_iterator< BLOCKSIZE, T, LAYOUT >::difference_type

Definition at line 199 of file strided_iterator.h.

template<uint32 BLOCKSIZE, typename T, block_strided_layout LAYOUT = ROW_MAJOR_LAYOUT>
typedef std::iterator_traits<T>::iterator_category nvbio::block_strided_iterator< BLOCKSIZE, T, LAYOUT >::iterator_category

Definition at line 201 of file strided_iterator.h.

template<uint32 BLOCKSIZE, typename T, block_strided_layout LAYOUT = ROW_MAJOR_LAYOUT>
typedef std::iterator_traits<T>::pointer nvbio::block_strided_iterator< BLOCKSIZE, T, LAYOUT >::pointer

Definition at line 198 of file strided_iterator.h.

template<uint32 BLOCKSIZE, typename T, block_strided_layout LAYOUT = ROW_MAJOR_LAYOUT>
typedef std::iterator_traits<T>::reference nvbio::block_strided_iterator< BLOCKSIZE, T, LAYOUT >::reference

Definition at line 196 of file strided_iterator.h.

template<uint32 BLOCKSIZE, typename T, block_strided_layout LAYOUT = ROW_MAJOR_LAYOUT>
typedef std::iterator_traits<T>::value_type nvbio::block_strided_iterator< BLOCKSIZE, T, LAYOUT >::value_type

Definition at line 195 of file strided_iterator.h.

Constructor & Destructor Documentation

template<uint32 BLOCKSIZE, typename T, block_strided_layout LAYOUT = ROW_MAJOR_LAYOUT>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE nvbio::block_strided_iterator< BLOCKSIZE, T, LAYOUT >::block_strided_iterator ( )
inline

constructor

Definition at line 206 of file strided_iterator.h.

template<uint32 BLOCKSIZE, typename T, block_strided_layout LAYOUT = ROW_MAJOR_LAYOUT>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE nvbio::block_strided_iterator< BLOCKSIZE, T, LAYOUT >::block_strided_iterator ( vec,
const uint32  stride,
const uint32  offset = 0 
)
inline

constructor

Definition at line 211 of file strided_iterator.h.

Member Function Documentation

template<uint32 BLOCKSIZE, typename T, block_strided_layout LAYOUT = ROW_MAJOR_LAYOUT>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE const_reference nvbio::block_strided_iterator< BLOCKSIZE, T, LAYOUT >::operator* ( ) const
inline

const dereferencing operator

Definition at line 216 of file strided_iterator.h.

template<uint32 BLOCKSIZE, typename T, block_strided_layout LAYOUT = ROW_MAJOR_LAYOUT>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE block_strided_iterator<BLOCKSIZE,T> nvbio::block_strided_iterator< BLOCKSIZE, T, LAYOUT >::operator+ ( const uint32  i) const
inline

addition

Definition at line 243 of file strided_iterator.h.

template<uint32 BLOCKSIZE, typename T, block_strided_layout LAYOUT = ROW_MAJOR_LAYOUT>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE block_strided_iterator<BLOCKSIZE,T>& nvbio::block_strided_iterator< BLOCKSIZE, T, LAYOUT >::operator++ ( )
inline

pre-increment

Definition at line 259 of file strided_iterator.h.

template<uint32 BLOCKSIZE, typename T, block_strided_layout LAYOUT = ROW_MAJOR_LAYOUT>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE difference_type nvbio::block_strided_iterator< BLOCKSIZE, T, LAYOUT >::operator- ( const block_strided_iterator< BLOCKSIZE, T >  it) const
inline

iterator subtraction

Definition at line 251 of file strided_iterator.h.

template<uint32 BLOCKSIZE, typename T, block_strided_layout LAYOUT = ROW_MAJOR_LAYOUT>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE const_reference nvbio::block_strided_iterator< BLOCKSIZE, T, LAYOUT >::operator[] ( const uint32  i) const
inline

const indexing operator

Definition at line 221 of file strided_iterator.h.

template<uint32 BLOCKSIZE, typename T, block_strided_layout LAYOUT = ROW_MAJOR_LAYOUT>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE reference nvbio::block_strided_iterator< BLOCKSIZE, T, LAYOUT >::operator[] ( const uint32  i)
inline

indexing operator

Definition at line 232 of file strided_iterator.h.

Member Data Documentation

template<uint32 BLOCKSIZE, typename T, block_strided_layout LAYOUT = ROW_MAJOR_LAYOUT>
uint32 nvbio::block_strided_iterator< BLOCKSIZE, T, LAYOUT >::m_offset

Definition at line 266 of file strided_iterator.h.

template<uint32 BLOCKSIZE, typename T, block_strided_layout LAYOUT = ROW_MAJOR_LAYOUT>
uint32 nvbio::block_strided_iterator< BLOCKSIZE, T, LAYOUT >::m_stride

Definition at line 267 of file strided_iterator.h.

template<uint32 BLOCKSIZE, typename T, block_strided_layout LAYOUT = ROW_MAJOR_LAYOUT>
T nvbio::block_strided_iterator< BLOCKSIZE, T, LAYOUT >::m_vec

Definition at line 265 of file strided_iterator.h.


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