NVBIO
|
A class to represent a packed stream of symbols, where the size of the symbol is specified at compile-time as a template parameter. The sequence is packed on top of an underlying stream of words, whose type can also be specified at compile-time in order to allow for different memory access patterns.
InputStream | the underlying stream of words used to hold the packed stream (e.g. uint32, uint4) |
Symbol | the unpacked symbol type (e.g. uint8) |
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 |
IndexType | the type of integer used to address the stream (e.g. uint32, uint64) |
Definition at line 191 of file packedstream.h.
#include <packedstream.h>
Public Types | |
typedef PackedStream < InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > | This |
typedef unsigned_type < IndexType >::type | index_type |
typedef signed_type< IndexType > ::type | sindex_type |
typedef std::iterator_traits < InputStream >::value_type | storage_type |
typedef InputStream | stream_type |
typedef InputStream | storage_iterator |
typedef Symbol | symbol_type |
typedef PackedStreamRef< This > | reference |
typedef Symbol | const_reference |
typedef reference * | pointer |
typedef std::iterator_traits < InputStream > ::iterator_category | iterator_category |
typedef symbol_type | value_type |
typedef sindex_type | difference_type |
typedef sindex_type | distance_type |
typedef This | iterator |
typedef This | const_iterator |
typedef ForwardPackedStream < InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > | forward_iterator |
Static Public Members | |
static const uint32 | SYMBOL_SIZE = SYMBOL_SIZE_T |
static const uint32 | SYMBOL_COUNT = 1u << SYMBOL_SIZE |
static const uint32 | SYMBOL_MASK = SYMBOL_COUNT - 1u |
static const uint32 | BIG_ENDIAN = BIG_ENDIAN_T |
static const uint32 | ALPHABET_SIZE = SYMBOL_COUNT |
static const uint32 | WORD_SIZE = uint32( sizeof(storage_type) ) |
static const uint32 | SYMBOLS_PER_WORD = (8u * WORD_SIZE) / SYMBOL_SIZE |
static const uint32 | VECTOR_WIDTH = SYMBOLS_PER_WORD |
Related Functions | |
(Note that these are not member functions.) | |
template<typename InputStream , typename Symbol , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename IndexType > | |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE bool | operator< (const PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &it1, const PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &it2) |
template<typename InputStream , typename Symbol , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename IndexType > | |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE bool | operator> (const PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &it1, const PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &it2) |
template<typename InputStream , typename Symbol , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename IndexType > | |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE bool | operator== (const PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &it1, const PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &it2) |
template<typename InputStream , typename Symbol , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename IndexType > | |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE bool | operator!= (const PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &it1, const PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &it2) |
template<typename InputIterator , typename InputStream , typename Symbol , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename IndexType > | |
NVBIO_HOST_DEVICE void | assign (const IndexType input_len, const InputIterator input_string, PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > packed_string) |
typedef This nvbio::PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::const_iterator |
Definition at line 220 of file packedstream.h.
typedef Symbol nvbio::PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::const_reference |
Definition at line 213 of file packedstream.h.
typedef sindex_type nvbio::PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::difference_type |
Definition at line 217 of file packedstream.h.
typedef sindex_type nvbio::PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::distance_type |
Definition at line 218 of file packedstream.h.
typedef ForwardPackedStream<InputStream,Symbol,SYMBOL_SIZE_T, BIG_ENDIAN_T,IndexType> nvbio::PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::forward_iterator |
Definition at line 221 of file packedstream.h.
typedef unsigned_type<IndexType>::type nvbio::PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::index_type |
Definition at line 195 of file packedstream.h.
typedef This nvbio::PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::iterator |
Definition at line 219 of file packedstream.h.
typedef std::iterator_traits<InputStream>::iterator_category nvbio::PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::iterator_category |
Definition at line 215 of file packedstream.h.
typedef reference* nvbio::PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::pointer |
Definition at line 214 of file packedstream.h.
typedef PackedStreamRef<This> nvbio::PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::reference |
Definition at line 212 of file packedstream.h.
typedef signed_type<IndexType>::type nvbio::PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::sindex_type |
Definition at line 196 of file packedstream.h.
typedef InputStream nvbio::PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::storage_iterator |
Definition at line 210 of file packedstream.h.
typedef std::iterator_traits<InputStream>::value_type nvbio::PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::storage_type |
Definition at line 197 of file packedstream.h.
typedef InputStream nvbio::PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::stream_type |
Definition at line 209 of file packedstream.h.
typedef Symbol nvbio::PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::symbol_type |
Definition at line 211 of file packedstream.h.
typedef PackedStream<InputStream,Symbol,SYMBOL_SIZE_T, BIG_ENDIAN_T,IndexType> nvbio::PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::This |
Definition at line 193 of file packedstream.h.
typedef symbol_type nvbio::PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::value_type |
Definition at line 216 of file packedstream.h.
|
inline |
empty constructor
Definition at line 225 of file packedstream.h.
|
inlineexplicit |
constructor
Definition at line 230 of file packedstream.h.
|
inline |
constructor
Definition at line 235 of file packedstream.h.
|
inline |
return begin iterator
Definition at line 267 of file packedstream.h.
|
inline |
get the current symbol
Definition at line 251 of file packedstream.h.
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE Symbol nvbio::PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::get | ( | const index_type | i) | const |
get the i-th symbol
Definition at line 609 of file packedstream_inl.h.
|
inline |
return the offset this iterator refers to
Definition at line 277 of file packedstream.h.
|
inline |
dereference operator
Definition at line 240 of file packedstream.h.
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > nvbio::PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::operator+ | ( | const sindex_type | distance) | const |
add offset
Definition at line 692 of file packedstream_inl.h.
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > & nvbio::PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::operator++ | ( | ) |
pre-increment operator
Definition at line 624 of file packedstream_inl.h.
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > nvbio::PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::operator++ | ( | int | dummy) |
post-increment operator
Definition at line 635 of file packedstream_inl.h.
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > & nvbio::PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::operator+= | ( | const sindex_type | distance) |
add offset
Definition at line 670 of file packedstream_inl.h.
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > nvbio::PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::operator- | ( | const sindex_type | distance) | const |
subtract offset
Definition at line 702 of file packedstream_inl.h.
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::sindex_type nvbio::PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::operator- | ( | const PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > | it) | const |
difference
Definition at line 712 of file packedstream_inl.h.
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > & nvbio::PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::operator-- | ( | ) |
pre-decrement operator
Definition at line 647 of file packedstream_inl.h.
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > nvbio::PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::operator-- | ( | int | dummy) |
post-decrement operator
Definition at line 658 of file packedstream_inl.h.
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > & nvbio::PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::operator-= | ( | const sindex_type | distance) |
subtract offset
Definition at line 681 of file packedstream_inl.h.
|
inline |
assignment operator
Definition at line 283 of file packedstream.h.
|
inline |
get the i-th symbol
Definition at line 244 of file packedstream.h.
|
inline |
get the i-th symbol
Definition at line 247 of file packedstream.h.
|
inline |
set the current symbol
Definition at line 255 of file packedstream.h.
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE void nvbio::PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::set | ( | const index_type | i, |
const Symbol | s | ||
) |
set the i-th symbol
Definition at line 614 of file packedstream_inl.h.
|
inline |
return the base stream
Definition at line 272 of file packedstream.h.
|
static |
Definition at line 203 of file packedstream.h.
|
static |
Definition at line 202 of file packedstream.h.
|
static |
Definition at line 200 of file packedstream.h.
|
static |
Definition at line 201 of file packedstream.h.
|
static |
Definition at line 199 of file packedstream.h.
|
static |
Definition at line 206 of file packedstream.h.
|
static |
Definition at line 207 of file packedstream.h.
|
static |
Definition at line 205 of file packedstream.h.