NVBIO
|
A simple class to cache accesses to a stream into a register. For example, this iterator can be useful to wrap the underlying (uint32 or uint4) storage of PackedStream's, so as to avoid repeated accesses to long latency memories.
Definition at line 140 of file cached_iterator.h.
#include <cached_iterator.h>
Public Types | |
typedef std::iterator_traits < InputStream >::value_type | value_type |
typedef std::iterator_traits < InputStream >::reference | reference |
typedef std::iterator_traits < InputStream >::pointer | pointer |
typedef std::iterator_traits < InputStream > ::difference_type | difference_type |
typedef std::random_access_iterator_tag | iterator_category |
Public Methods | |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE | const_cached_iterator () |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE | const_cached_iterator (InputStream stream) |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE value_type | operator[] (const uint32 i) const |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE InputStream | stream () const |
Public Members | |
InputStream | m_stream |
uint32 | m_cache_idx |
value_type | m_cache_val |
typedef std::iterator_traits<InputStream>::difference_type nvbio::const_cached_iterator< InputStream >::difference_type |
Definition at line 145 of file cached_iterator.h.
typedef std::random_access_iterator_tag nvbio::const_cached_iterator< InputStream >::iterator_category |
Definition at line 147 of file cached_iterator.h.
typedef std::iterator_traits<InputStream>::pointer nvbio::const_cached_iterator< InputStream >::pointer |
Definition at line 144 of file cached_iterator.h.
typedef std::iterator_traits<InputStream>::reference nvbio::const_cached_iterator< InputStream >::reference |
Definition at line 143 of file cached_iterator.h.
typedef std::iterator_traits<InputStream>::value_type nvbio::const_cached_iterator< InputStream >::value_type |
Definition at line 142 of file cached_iterator.h.
|
inline |
constructor
Definition at line 151 of file cached_iterator.h.
|
inline |
constructor
Definition at line 155 of file cached_iterator.h.
|
inline |
|
inline |
base stream
Definition at line 174 of file cached_iterator.h.
|
mutable |
Definition at line 177 of file cached_iterator.h.
|
mutable |
Definition at line 178 of file cached_iterator.h.
InputStream nvbio::const_cached_iterator< InputStream >::m_stream |
Definition at line 176 of file cached_iterator.h.