NVBIO
|
A utility wrapper to cache a window of a packed-string into a local memory buffer and present a wrapper string iterator to the cached entries.
StorageIterator | the underlying stream of words used to hold the packed stream (e.g. uint32, uint4) |
SYMBOL_SIZE_T | the number of bits needed for each symbol |
BIG_ENDIAN_T | the "endianness" of the words: if true, symbols will be packed from right to left within each word |
CACHE_SIZE | the size of the local memory cache, in words |
Definition at line 77 of file packedstream_loader.h.
#include <packedstream_loader.h>
Public Types | |
typedef PackedStream < StorageIterator, uint8, SYMBOL_SIZE_T, BIG_ENDIAN_T > | input_stream |
typedef input_stream | input_iterator |
typedef std::iterator_traits < StorageIterator > ::value_type | storage_type |
typedef PackedStream < const_cached_iterator< const storage_type * >, uint8, SYMBOL_SIZE_T, BIG_ENDIAN_T > ::iterator | iterator |
Public Methods | |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE iterator | load (const input_stream stream, const uint32 length) |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE iterator | load (const input_stream stream, const uint32 length, const uint2 loaded_range, const uint32 rev_flag) |
Public Members | |
storage_type | lmem [CACHE_SIZE] |
typedef input_stream nvbio::PackedStringLoader< StorageIterator, SYMBOL_SIZE_T, BIG_ENDIAN_T, lmem_cache_tag< CACHE_SIZE > >::input_iterator |
Definition at line 80 of file packedstream_loader.h.
typedef PackedStream<StorageIterator,uint8,SYMBOL_SIZE_T,BIG_ENDIAN_T> nvbio::PackedStringLoader< StorageIterator, SYMBOL_SIZE_T, BIG_ENDIAN_T, lmem_cache_tag< CACHE_SIZE > >::input_stream |
Definition at line 79 of file packedstream_loader.h.
typedef PackedStream<const_cached_iterator<const storage_type*>,uint8,SYMBOL_SIZE_T,BIG_ENDIAN_T>::iterator nvbio::PackedStringLoader< StorageIterator, SYMBOL_SIZE_T, BIG_ENDIAN_T, lmem_cache_tag< CACHE_SIZE > >::iterator |
Definition at line 82 of file packedstream_loader.h.
typedef std::iterator_traits<StorageIterator>::value_type nvbio::PackedStringLoader< StorageIterator, SYMBOL_SIZE_T, BIG_ENDIAN_T, lmem_cache_tag< CACHE_SIZE > >::storage_type |
Definition at line 81 of file packedstream_loader.h.
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE PackedStringLoader< StorageIterator, SYMBOL_SIZE_T, BIG_ENDIAN_T, lmem_cache_tag< CACHE_SIZE > >::iterator nvbio::PackedStringLoader< StorageIterator, SYMBOL_SIZE_T, BIG_ENDIAN_T, lmem_cache_tag< CACHE_SIZE > >::load | ( | const input_stream | stream, |
const uint32 | length | ||
) |
given a packed stream, load part of it starting at the given offset, and return an iterator to the first loaded symbol
stream | input stream storage |
offset | offset to the first symbol to load |
length | length of the substring to load |
Definition at line 119 of file packedstream_loader_inl.h.
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE PackedStringLoader< StorageIterator, SYMBOL_SIZE_T, BIG_ENDIAN_T, lmem_cache_tag< CACHE_SIZE > >::iterator nvbio::PackedStringLoader< StorageIterator, SYMBOL_SIZE_T, BIG_ENDIAN_T, lmem_cache_tag< CACHE_SIZE > >::load | ( | const input_stream | stream, |
const uint32 | length, | ||
const uint2 | loaded_range, | ||
const uint32 | rev_flag | ||
) |
given a packed stream, and a window of symbols that is virtually mapped to the cache, load a substring of it and return an iterator to the first symbol of the window.
/// [....|*****|####|****|...] /// ^ ^ ^ ^ /// offset=5 | | offset+length /// | | /// loaded_range = (6,10) ///
stream | input stream storage |
length | length of the mapped substring |
loaded_range | range of the substring to load |
rev_flag | true if the range is specified wrt reversed coordinates |
Definition at line 127 of file packedstream_loader_inl.h.
storage_type nvbio::PackedStringLoader< StorageIterator, SYMBOL_SIZE_T, BIG_ENDIAN_T, lmem_cache_tag< CACHE_SIZE > >::lmem[CACHE_SIZE] |
Definition at line 117 of file packedstream_loader.h.