NVBIO
|
A collection of strings stored in strided fashion. i.e. if the stride is n, the i-th string s_i is stored in the symbols s(i + 0), s(i + n), s(i + 2n), ...
s0 | s1 | s2 | ... |
s(0 + 0) | s(1 + 0) | s(2 + 0) | ... |
s(0 + n) | s(1 + n) | s(2 + n) | ... |
s(0 + 2n) | s(1 + 2n) | s(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 symbols must be at least n times the length of the longest string in the set.
Definition at line 836 of file string_set.h.
#include <string_set.h>
Public Types | |
typedef strided_string_set_tag | string_set_tag |
typedef std::iterator_traits < StringIterator >::value_type | symbol_type |
typedef StringIterator | symbol_iterator |
typedef strided_iterator < StringIterator > | strided_symbol_iterator |
typedef vector_view < strided_symbol_iterator > | string_type |
typedef LengthIterator | length_iterator |
typedef iterator_system < StringIterator >::type | system_tag |
typedef StringSetIterator < StridedStringSet < StringIterator, LengthIterator > > | iterator |
typedef StringSetIterator < StridedStringSet < StringIterator, LengthIterator > > | const_iterator |
Public Methods | |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE | StridedStringSet () |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE | StridedStringSet (const uint32 size, const uint32 stride, const StringIterator string, 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 |
const_iterator | begin () const |
const_iterator | end () const |
iterator | begin () |
iterator | end () |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE symbol_iterator | base_string () const |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE length_iterator | lengths () const |
typedef StringSetIterator< StridedStringSet<StringIterator,LengthIterator> > nvbio::StridedStringSet< StringIterator, LengthIterator >::const_iterator |
Definition at line 848 of file string_set.h.
typedef StringSetIterator< StridedStringSet<StringIterator,LengthIterator> > nvbio::StridedStringSet< StringIterator, LengthIterator >::iterator |
Definition at line 847 of file string_set.h.
typedef LengthIterator nvbio::StridedStringSet< StringIterator, LengthIterator >::length_iterator |
Definition at line 844 of file string_set.h.
typedef strided_iterator<StringIterator> nvbio::StridedStringSet< StringIterator, LengthIterator >::strided_symbol_iterator |
Definition at line 842 of file string_set.h.
typedef strided_string_set_tag nvbio::StridedStringSet< StringIterator, LengthIterator >::string_set_tag |
Definition at line 838 of file string_set.h.
typedef vector_view<strided_symbol_iterator> nvbio::StridedStringSet< StringIterator, LengthIterator >::string_type |
Definition at line 843 of file string_set.h.
typedef StringIterator nvbio::StridedStringSet< StringIterator, LengthIterator >::symbol_iterator |
Definition at line 841 of file string_set.h.
typedef std::iterator_traits<StringIterator>::value_type nvbio::StridedStringSet< StringIterator, LengthIterator >::symbol_type |
Definition at line 839 of file string_set.h.
typedef iterator_system<StringIterator>::type nvbio::StridedStringSet< StringIterator, LengthIterator >::system_tag |
Definition at line 845 of file string_set.h.
|
inline |
default constructor
Definition at line 853 of file string_set.h.
|
inline |
constructor
size | set size |
stride | set stride |
string | flat string iterator |
lengths | string lengths |
Definition at line 863 of file string_set.h.
|
inline |
return the base string
Definition at line 916 of file string_set.h.
|
inline |
begin iterator
Definition at line 899 of file string_set.h.
|
inline |
begin iterator
Definition at line 907 of file string_set.h.
|
inline |
begin iterator
Definition at line 903 of file string_set.h.
|
inline |
begin iterator
Definition at line 911 of file string_set.h.
|
inline |
return the length vector
Definition at line 921 of file string_set.h.
|
inline |
indexing operator: access the i-th string
Definition at line 886 of file string_set.h.
|
inline |
set size
Definition at line 876 of file string_set.h.
|
inline |
stride
Definition at line 881 of file string_set.h.