NVBIO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Methods | Static Public Members | List of all members
nvbio::StridedPackedStringSet< StreamIterator, SymbolType, SYMBOL_SIZE_T, BIG_ENDIAN_T, LengthIterator > Struct Template Reference

Detailed description

template< typename StreamIterator, typename SymbolType, uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename LengthIterator>
struct nvbio::StridedPackedStringSet< StreamIterator, SymbolType, SYMBOL_SIZE_T, BIG_ENDIAN_T, LengthIterator >

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
 

Member Typedef Documentation

template<typename StreamIterator, typename SymbolType, uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename LengthIterator>
typedef LengthIterator nvbio::StridedPackedStringSet< StreamIterator, SymbolType, SYMBOL_SIZE_T, BIG_ENDIAN_T, LengthIterator >::length_iterator

Definition at line 744 of file string_set.h.

template<typename StreamIterator, typename SymbolType, uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename LengthIterator>
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.

template<typename StreamIterator, typename SymbolType, uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename LengthIterator>
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.

template<typename StreamIterator, typename SymbolType, uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename LengthIterator>
typedef StreamIterator nvbio::StridedPackedStringSet< StreamIterator, SymbolType, SYMBOL_SIZE_T, BIG_ENDIAN_T, LengthIterator >::stream_iterator

Definition at line 739 of file string_set.h.

template<typename StreamIterator, typename SymbolType, uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename LengthIterator>
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.

template<typename StreamIterator, typename SymbolType, uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename LengthIterator>
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.

template<typename StreamIterator, typename SymbolType, uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename LengthIterator>
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.

template<typename StreamIterator, typename SymbolType, uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename LengthIterator>
typedef SymbolType nvbio::StridedPackedStringSet< StreamIterator, SymbolType, SYMBOL_SIZE_T, BIG_ENDIAN_T, LengthIterator >::symbol_type

Definition at line 737 of file string_set.h.

template<typename StreamIterator, typename SymbolType, uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename LengthIterator>
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.

Constructor & Destructor Documentation

template<typename StreamIterator, typename SymbolType, uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename LengthIterator>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE nvbio::StridedPackedStringSet< StreamIterator, SymbolType, SYMBOL_SIZE_T, BIG_ENDIAN_T, LengthIterator >::StridedPackedStringSet ( )
inline

default constructor

Definition at line 753 of file string_set.h.

template<typename StreamIterator, typename SymbolType, uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename LengthIterator>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE nvbio::StridedPackedStringSet< StreamIterator, SymbolType, SYMBOL_SIZE_T, BIG_ENDIAN_T, LengthIterator >::StridedPackedStringSet ( const uint32  size,
const uint32  stride,
const StreamIterator  stream,
const LengthIterator  lengths 
)
inline

constructor

Parameters
sizeset size
strideset stride
stringflat string iterator
lengthsstring lengths

Definition at line 763 of file string_set.h.

Member Function Documentation

template<typename StreamIterator, typename SymbolType, uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename LengthIterator>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE stream_iterator nvbio::StridedPackedStringSet< StreamIterator, SymbolType, SYMBOL_SIZE_T, BIG_ENDIAN_T, LengthIterator >::base_stream ( ) const
inline

return the base string

Definition at line 801 of file string_set.h.

template<typename StreamIterator, typename SymbolType, uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename LengthIterator>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE length_iterator nvbio::StridedPackedStringSet< StreamIterator, SymbolType, SYMBOL_SIZE_T, BIG_ENDIAN_T, LengthIterator >::lengths ( ) const
inline

return the length vector

Definition at line 806 of file string_set.h.

template<typename StreamIterator, typename SymbolType, uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename LengthIterator>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE string_type nvbio::StridedPackedStringSet< StreamIterator, SymbolType, SYMBOL_SIZE_T, BIG_ENDIAN_T, LengthIterator >::operator[] ( const uint32  i) const
inline

indexing operator: access the i-th string

Definition at line 786 of file string_set.h.

template<typename StreamIterator, typename SymbolType, uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename LengthIterator>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE uint32 nvbio::StridedPackedStringSet< StreamIterator, SymbolType, SYMBOL_SIZE_T, BIG_ENDIAN_T, LengthIterator >::size ( void  ) const
inline

set size

Definition at line 776 of file string_set.h.

template<typename StreamIterator, typename SymbolType, uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename LengthIterator>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE uint32 nvbio::StridedPackedStringSet< StreamIterator, SymbolType, SYMBOL_SIZE_T, BIG_ENDIAN_T, LengthIterator >::stride ( ) const
inline

stride

Definition at line 781 of file string_set.h.

Member Data Documentation

template<typename StreamIterator, typename SymbolType, uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename LengthIterator>
const bool nvbio::StridedPackedStringSet< StreamIterator, SymbolType, SYMBOL_SIZE_T, BIG_ENDIAN_T, LengthIterator >::BIG_ENDIAN = BIG_ENDIAN_T
static

Definition at line 748 of file string_set.h.

template<typename StreamIterator, typename SymbolType, uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename LengthIterator>
const uint32 nvbio::StridedPackedStringSet< StreamIterator, SymbolType, SYMBOL_SIZE_T, BIG_ENDIAN_T, LengthIterator >::SYMBOL_SIZE = SYMBOL_SIZE_T
static

Definition at line 747 of file string_set.h.


The documentation for this struct was generated from the following file: