NVBIO
|
A collection of packed strings stored in strided vectors of words. i.e. if the stride is n, the i-th string s_i is stored in the words w(i + 0), w(i + n), w(i + 2n), ...
s0 | s1 | s2 | ... |
w(0 + 0) | w(1 + 0) | w(2 + 0) | ... |
w(0 + n) | w(1 + n) | w(2 + n) | ... |
w(0 + 2n) | w(1 + 2n) | w(2 + 2n) | ... |
This representation can be convenient for kernels where the i-th thread (modulo the grid-size) operates on the i-th string and the character accesses are in-sync, as in this case all the memory accesses will be coalesced.
Note that the number of words must be at least n times the number of words needed to store the longest string in the set.
Definition at line 734 of file string_set.h.
#include <string_set.h>
Public Types | |
typedef strided_packed_string_set_tag | string_set_tag |
typedef SymbolType | symbol_type |
typedef StreamIterator | stream_iterator |
typedef strided_iterator < StreamIterator > | strided_stream_iterator |
typedef PackedStream < strided_stream_iterator, SymbolType, SYMBOL_SIZE_T, BIG_ENDIAN_T > | packed_stream_type |
typedef packed_stream_type::iterator | packed_stream_iterator |
typedef vector_view < packed_stream_type > | string_type |
typedef LengthIterator | length_iterator |
typedef iterator_system < StreamIterator >::type | system_tag |
Public Methods | |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE | StridedPackedStringSet () |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE | StridedPackedStringSet (const uint32 size, const uint32 stride, const StreamIterator stream, const LengthIterator lengths) |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE uint32 | size () const |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE uint32 | stride () const |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE string_type | operator[] (const uint32 i) const |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE stream_iterator | base_stream () const |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE length_iterator | lengths () const |
Static Public Members | |
static const uint32 | SYMBOL_SIZE = SYMBOL_SIZE_T |
static const bool | BIG_ENDIAN = BIG_ENDIAN_T |
typedef LengthIterator nvbio::StridedPackedStringSet< StreamIterator, SymbolType, SYMBOL_SIZE_T, BIG_ENDIAN_T, LengthIterator >::length_iterator |
Definition at line 744 of file string_set.h.
typedef packed_stream_type::iterator nvbio::StridedPackedStringSet< StreamIterator, SymbolType, SYMBOL_SIZE_T, BIG_ENDIAN_T, LengthIterator >::packed_stream_iterator |
Definition at line 742 of file string_set.h.
typedef PackedStream<strided_stream_iterator,SymbolType,SYMBOL_SIZE_T,BIG_ENDIAN_T> nvbio::StridedPackedStringSet< StreamIterator, SymbolType, SYMBOL_SIZE_T, BIG_ENDIAN_T, LengthIterator >::packed_stream_type |
Definition at line 741 of file string_set.h.
typedef StreamIterator nvbio::StridedPackedStringSet< StreamIterator, SymbolType, SYMBOL_SIZE_T, BIG_ENDIAN_T, LengthIterator >::stream_iterator |
Definition at line 739 of file string_set.h.
typedef strided_iterator<StreamIterator> nvbio::StridedPackedStringSet< StreamIterator, SymbolType, SYMBOL_SIZE_T, BIG_ENDIAN_T, LengthIterator >::strided_stream_iterator |
Definition at line 740 of file string_set.h.
typedef strided_packed_string_set_tag nvbio::StridedPackedStringSet< StreamIterator, SymbolType, SYMBOL_SIZE_T, BIG_ENDIAN_T, LengthIterator >::string_set_tag |
Definition at line 736 of file string_set.h.
typedef vector_view<packed_stream_type> nvbio::StridedPackedStringSet< StreamIterator, SymbolType, SYMBOL_SIZE_T, BIG_ENDIAN_T, LengthIterator >::string_type |
Definition at line 743 of file string_set.h.
typedef SymbolType nvbio::StridedPackedStringSet< StreamIterator, SymbolType, SYMBOL_SIZE_T, BIG_ENDIAN_T, LengthIterator >::symbol_type |
Definition at line 737 of file string_set.h.
typedef iterator_system<StreamIterator>::type nvbio::StridedPackedStringSet< StreamIterator, SymbolType, SYMBOL_SIZE_T, BIG_ENDIAN_T, LengthIterator >::system_tag |
Definition at line 745 of file string_set.h.
|
inline |
default constructor
Definition at line 753 of file string_set.h.
|
inline |
constructor
size | set size |
stride | set stride |
string | flat string iterator |
lengths | string lengths |
Definition at line 763 of file string_set.h.
|
inline |
return the base string
Definition at line 801 of file string_set.h.
|
inline |
return the length vector
Definition at line 806 of file string_set.h.
|
inline |
indexing operator: access the i-th string
Definition at line 786 of file string_set.h.
|
inline |
set size
Definition at line 776 of file string_set.h.
|
inline |
stride
Definition at line 781 of file string_set.h.
|
static |
Definition at line 748 of file string_set.h.
|
static |
Definition at line 747 of file string_set.h.