NVBIO
|
A class to represent a vector of packed 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 32-bit words.
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 53 of file packed_vector.h.
#include <packed_vector.h>
Public Types | |
typedef SystemTag | system_tag |
typedef IndexType | index_type |
typedef nvbio::vector < system_tag, uint32 > ::pointer | pointer |
typedef nvbio::vector < system_tag, uint32 > ::const_pointer | const_pointer |
typedef PackedStream< pointer, uint8, SYMBOL_SIZE, BIG_ENDIAN, IndexType > | stream_type |
typedef PackedStream < const_pointer, uint8, SYMBOL_SIZE, BIG_ENDIAN, IndexType > | const_stream_type |
typedef stream_type::iterator | iterator |
typedef const_stream_type::iterator | const_iterator |
typedef ForwardPackedStream < const_pointer, uint8, SYMBOL_SIZE, BIG_ENDIAN, IndexType > | forward_iterator |
typedef uint8 | value_type |
typedef PackedStreamRef < stream_type > | reference |
typedef PackedStreamRef < const_stream_type > | const_reference |
typedef stream_type | plain_view_type |
typedef const_stream_type | const_plain_view_type |
Public Methods | |
PackedVector (const index_type size=0) | |
template<typename other_tag > | |
PackedVector (const PackedVector< other_tag, SYMBOL_SIZE, BIG_ENDIAN, IndexType > &other) | |
void | reserve (const index_type size) |
void | resize (const index_type size) |
void | clear (void) |
index_type | size () const |
index_type | length () const |
index_type | capacity () const |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
void | push_back (const uint8 s) |
void * | addrof (const index_type i) |
get the memory address of a symbol More... | |
NVBIO_FORCEINLINE NVBIO_HOST const stream_type::symbol_type | operator[] (const index_type i) const |
NVBIO_FORCEINLINE NVBIO_HOST stream_type::reference | operator[] (const index_type i) |
Public Members | |
nvbio::vector< system_tag, uint32 > | m_storage |
index_type | m_size |
Static Public Members | |
static const uint32 | SYMBOL_SIZE = SYMBOL_SIZE_T |
static const uint32 | BIG_ENDIAN = BIG_ENDIAN_T |
static const uint32 | SYMBOLS_PER_WORD = 32 / SYMBOL_SIZE |
static const uint32 | VECTOR_WIDTH = SYMBOLS_PER_WORD |
typedef const_stream_type::iterator nvbio::PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::const_iterator |
Definition at line 70 of file packed_vector.h.
typedef const_stream_type nvbio::PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::const_plain_view_type |
Definition at line 78 of file packed_vector.h.
typedef nvbio::vector<system_tag,uint32>::const_pointer nvbio::PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::const_pointer |
Definition at line 65 of file packed_vector.h.
typedef PackedStreamRef<const_stream_type> nvbio::PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::const_reference |
Definition at line 75 of file packed_vector.h.
typedef PackedStream<const_pointer,uint8,SYMBOL_SIZE,BIG_ENDIAN,IndexType> nvbio::PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::const_stream_type |
Definition at line 68 of file packed_vector.h.
typedef ForwardPackedStream<const_pointer,uint8,SYMBOL_SIZE,BIG_ENDIAN,IndexType> nvbio::PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::forward_iterator |
Definition at line 71 of file packed_vector.h.
typedef IndexType nvbio::PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::index_type |
Definition at line 62 of file packed_vector.h.
typedef stream_type::iterator nvbio::PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::iterator |
Definition at line 69 of file packed_vector.h.
typedef stream_type nvbio::PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::plain_view_type |
Definition at line 77 of file packed_vector.h.
typedef nvbio::vector<system_tag,uint32>::pointer nvbio::PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::pointer |
Definition at line 64 of file packed_vector.h.
typedef PackedStreamRef<stream_type> nvbio::PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::reference |
Definition at line 74 of file packed_vector.h.
typedef PackedStream< pointer,uint8,SYMBOL_SIZE,BIG_ENDIAN,IndexType> nvbio::PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::stream_type |
Definition at line 67 of file packed_vector.h.
typedef SystemTag nvbio::PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::system_tag |
Definition at line 61 of file packed_vector.h.
typedef uint8 nvbio::PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::value_type |
Definition at line 73 of file packed_vector.h.
nvbio::PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::PackedVector | ( | const index_type | size = 0 ) |
constructor
Definition at line 35 of file packed_vector_inl.h.
|
inline |
copy constructor
Definition at line 87 of file packed_vector.h.
void * nvbio::PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::addrof | ( | const index_type | i) |
get the memory address of a symbol
Definition at line 120 of file packed_vector_inl.h.
PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::iterator nvbio::PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::begin | ( | void | ) |
return the begin iterator
Definition at line 70 of file packed_vector_inl.h.
PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::const_iterator nvbio::PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::begin | ( | void | ) | const |
return the begin iterator
Definition at line 90 of file packed_vector_inl.h.
|
inline |
Definition at line 110 of file packed_vector.h.
void nvbio::PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::clear | ( | void | ) |
clear
Definition at line 61 of file packed_vector_inl.h.
PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::iterator nvbio::PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::end | ( | void | ) |
return the end iterator
Definition at line 80 of file packed_vector_inl.h.
PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::const_iterator nvbio::PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::end | ( | void | ) | const |
return the end iterator
Definition at line 100 of file packed_vector_inl.h.
|
inline |
length
Definition at line 108 of file packed_vector.h.
|
inline |
get the i-th symbol note: no device implementation for this as PackedVectors are never used on device (only their plain view, which is a PackedStream)
Definition at line 138 of file packed_vector.h.
|
inline |
get the i-th symbol note: no device implementation for this as PackedVectors are never used on device (only their plain view, which is a PackedStream)
Definition at line 147 of file packed_vector.h.
void nvbio::PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::push_back | ( | const uint8 | s) |
push back a symbol
Definition at line 109 of file packed_vector_inl.h.
void nvbio::PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::reserve | ( | const index_type | size) |
reserve
Definition at line 42 of file packed_vector_inl.h.
void nvbio::PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::resize | ( | const index_type | size) |
resize
Definition at line 51 of file packed_vector_inl.h.
|
inline |
size
Definition at line 104 of file packed_vector.h.
|
static |
Definition at line 56 of file packed_vector.h.
index_type nvbio::PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::m_size |
Definition at line 154 of file packed_vector.h.
nvbio::vector<system_tag,uint32> nvbio::PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >::m_storage |
Definition at line 153 of file packed_vector.h.
|
static |
Definition at line 55 of file packed_vector.h.
|
static |
Definition at line 58 of file packed_vector.h.
|
static |
Definition at line 59 of file packed_vector.h.