NVBIO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Methods | List of all members
nvbio::StridedStringSet< StringIterator, LengthIterator > Struct Template Reference

Detailed description

template< typename StringIterator, typename LengthIterator>
struct nvbio::StridedStringSet< StringIterator, LengthIterator >

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
 

Member Typedef Documentation

template<typename StringIterator, typename LengthIterator>
typedef StringSetIterator< StridedStringSet<StringIterator,LengthIterator> > nvbio::StridedStringSet< StringIterator, LengthIterator >::const_iterator

Definition at line 848 of file string_set.h.

template<typename StringIterator, typename LengthIterator>
typedef StringSetIterator< StridedStringSet<StringIterator,LengthIterator> > nvbio::StridedStringSet< StringIterator, LengthIterator >::iterator

Definition at line 847 of file string_set.h.

template<typename StringIterator, typename LengthIterator>
typedef LengthIterator nvbio::StridedStringSet< StringIterator, LengthIterator >::length_iterator

Definition at line 844 of file string_set.h.

template<typename StringIterator, typename LengthIterator>
typedef strided_iterator<StringIterator> nvbio::StridedStringSet< StringIterator, LengthIterator >::strided_symbol_iterator

Definition at line 842 of file string_set.h.

template<typename StringIterator, typename LengthIterator>
typedef strided_string_set_tag nvbio::StridedStringSet< StringIterator, LengthIterator >::string_set_tag

Definition at line 838 of file string_set.h.

template<typename StringIterator, typename LengthIterator>
typedef vector_view<strided_symbol_iterator> nvbio::StridedStringSet< StringIterator, LengthIterator >::string_type

Definition at line 843 of file string_set.h.

template<typename StringIterator, typename LengthIterator>
typedef StringIterator nvbio::StridedStringSet< StringIterator, LengthIterator >::symbol_iterator

Definition at line 841 of file string_set.h.

template<typename StringIterator, typename LengthIterator>
typedef std::iterator_traits<StringIterator>::value_type nvbio::StridedStringSet< StringIterator, LengthIterator >::symbol_type

Definition at line 839 of file string_set.h.

template<typename StringIterator, typename LengthIterator>
typedef iterator_system<StringIterator>::type nvbio::StridedStringSet< StringIterator, LengthIterator >::system_tag

Definition at line 845 of file string_set.h.

Constructor & Destructor Documentation

template<typename StringIterator, typename LengthIterator>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE nvbio::StridedStringSet< StringIterator, LengthIterator >::StridedStringSet ( )
inline

default constructor

Definition at line 853 of file string_set.h.

template<typename StringIterator, typename LengthIterator>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE nvbio::StridedStringSet< StringIterator, LengthIterator >::StridedStringSet ( const uint32  size,
const uint32  stride,
const StringIterator  string,
const LengthIterator  lengths 
)
inline

constructor

Parameters
sizeset size
strideset stride
stringflat string iterator
lengthsstring lengths

Definition at line 863 of file string_set.h.

Member Function Documentation

template<typename StringIterator, typename LengthIterator>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE symbol_iterator nvbio::StridedStringSet< StringIterator, LengthIterator >::base_string ( ) const
inline

return the base string

Definition at line 916 of file string_set.h.

template<typename StringIterator, typename LengthIterator>
const_iterator nvbio::StridedStringSet< StringIterator, LengthIterator >::begin ( void  ) const
inline

begin iterator

Definition at line 899 of file string_set.h.

template<typename StringIterator, typename LengthIterator>
iterator nvbio::StridedStringSet< StringIterator, LengthIterator >::begin ( void  )
inline

begin iterator

Definition at line 907 of file string_set.h.

template<typename StringIterator, typename LengthIterator>
const_iterator nvbio::StridedStringSet< StringIterator, LengthIterator >::end ( void  ) const
inline

begin iterator

Definition at line 903 of file string_set.h.

template<typename StringIterator, typename LengthIterator>
iterator nvbio::StridedStringSet< StringIterator, LengthIterator >::end ( void  )
inline

begin iterator

Definition at line 911 of file string_set.h.

template<typename StringIterator, typename LengthIterator>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE length_iterator nvbio::StridedStringSet< StringIterator, LengthIterator >::lengths ( ) const
inline

return the length vector

Definition at line 921 of file string_set.h.

template<typename StringIterator, typename LengthIterator>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE string_type nvbio::StridedStringSet< StringIterator, LengthIterator >::operator[] ( const uint32  i) const
inline

indexing operator: access the i-th string

Definition at line 886 of file string_set.h.

template<typename StringIterator, typename LengthIterator>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE uint32 nvbio::StridedStringSet< StringIterator, LengthIterator >::size ( void  ) const
inline

set size

Definition at line 876 of file string_set.h.

template<typename StringIterator, typename LengthIterator>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE uint32 nvbio::StridedStringSet< StringIterator, LengthIterator >::stride ( ) const
inline

stride

Definition at line 881 of file string_set.h.


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