NVBIO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Classes | Typedefs | Enumerations | Functions
nvbio::priv Namespace Reference

Namespaces

 wtree
 

Classes

struct  PipelineThreadBase
 
struct  PipelineSinkThread
 
struct  PipelineStageThread
 
struct  DCS_predicate
 
struct  DCS_string_suffix_index
 
struct  DCS_string_suffix_less
 
struct  DeviceCoreSetSuffixBucketer
 
struct  DeviceSetSuffixBucketer
 
struct  HostCoreSetSuffixBucketer
 
struct  HostSetSuffixBucketer
 
struct  word_selector
 
struct  word_selector< 4 >
 
struct  word_selector< 6 >
 
struct  word_selector< 8 >
 
struct  word_selector< 10 >
 
struct  word_selector< 12 >
 
struct  word_selector< 14 >
 
struct  word_selector< 16 >
 
struct  word_selector< 18 >
 
struct  word_selector< 20 >
 
struct  word_selector< 22 >
 
struct  word_selector< 24 >
 
struct  word_selector< 26 >
 
struct  word_selector< 28 >
 
struct  word_selector< 30 >
 
struct  word_selector< 32 >
 
struct  word_selector< 48 >
 
struct  word_selector< 64 >
 
struct  in_range_functor
 
struct  minus_one
 
struct  offset_functor
 
struct  add_divide_functor
 
struct  length_functor
 
struct  suffix_offset_functor
 
struct  suffix_component_functor
 
struct  localize_suffix_functor
 
struct  local_set_suffix_word_functor
 
struct  local_set_suffix_word_functor< SYMBOL_SIZE, WORD_BITS, DOLLAR_BITS, ConcatenatedStringSet< PackedStream< storage_type, uint8, SYMBOL_SIZE, true, typename std::iterator_traits< offsets_iterator >::value_type >, offsets_iterator >, word_type >
 
struct  global_set_suffix_word_functor
 
struct  string_suffix_word_functor
 
struct  string_suffix_word_functor< SYMBOL_SIZE, WORD_BITS, DOLLAR_BITS, PackedStream< storage_type, symbol_type, SYMBOL_SIZE, true, index_type >, word_type >
 
struct  string_suffix_difference
 
struct  string_suffix_less
 
struct  string_bwt_functor
 
struct  string_set_bwt_functor
 
struct  remove_singletons
 
struct  merge_keys
 
struct  Bits
 
struct  SetSuffixFlattener
 
struct  ChunkLoader
 
struct  ChunkLoader< SYMBOL_SIZE, BIG_ENDIAN, storage_type, offsets_iterator, host_tag, device_tag >
 
struct  ChunkLoader< SYMBOL_SIZE, BIG_ENDIAN, storage_type, offsets_iterator, system_tag, system_tag >
 
struct  StringSuffixBucketer
 
struct  HostStringSetRadices
 
struct  DeviceStringSetRadices
 
struct  DollarExtractor
 
struct  device_copy_dispatch
 
struct  device_copy_dispatch< input_iterator, PackedStream< storage_type, uint8, SYMBOL_SIZE, BIG_ENDIAN, index_type >, index_type >
 
struct  device_scatter_dispatch
 
struct  device_scatter_dispatch< input_iterator, slot_iterator, PackedStream< storage_type, uint8, SYMBOL_SIZE, BIG_ENDIAN, index_type > >
 

Typedefs

typedef ConcatenatedStringSet
< PackedStream< uint32
*, uint8, 2u, false, uint64 >, uint64 * > 
string_set_2bit
 
typedef ConcatenatedStringSet
< PackedStream< uint32
*, uint8, 2u, false, uint64 >, uint64 * > 
string_set_4bit
 
typedef ConcatenatedStringSet
< PackedStream< uint32
*, uint8, 8u, false, uint64 >, uint64 * > 
string_set_8bit
 
typedef ConcatenatedStringSet
< PackedStream< uint32
*, uint8, 2u, true, uint64 >, uint64 * > 
string_set_2bit_be
 
typedef ConcatenatedStringSet
< PackedStream< uint64
*, uint8, 2u, true, uint64 >, uint64 * > 
string_set_2bit_u64_be
 
typedef PackedStream< uint32
*, uint8, 2u, false, uint64 > 
string_2bit_le
 
typedef PackedStream< uint32
*, uint8, 4u, false, uint64 > 
string_4bit_le
 
typedef PackedStream< uint32
*, uint8, 8u, false, uint64 > 
string_8bit_le
 
typedef PackedStream< uint32
*, uint8, 2u, true, uint64 > 
string_2bit_be
 
typedef PackedStream< uint32
*, uint8, 4u, true, uint64 > 
string_4bit_be
 
typedef PackedStream< uint32
*, uint8, 8u, true, uint64 > 
string_8bit_be
 

Enumerations

enum  SuffixComponent { SUFFIX_ID = 0, STRING_ID = 1 }
 

Functions

template<typename InputIterator , typename InputStream , typename Symbol , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename IndexType >
NVBIO_HOST_DEVICE void serial_assign (const IndexType input_len, InputIterator input_string, PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > packed_string)
 
template<typename StreamType , typename SymbolType , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename W >
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE PackedStream
< const_cached_iterator< const
W * >, SymbolType,
SYMBOL_SIZE_T, BIG_ENDIAN_T >
::iterator 
make_local_string (const PackedStream< StreamType, SymbolType, SYMBOL_SIZE_T, BIG_ENDIAN_T > in_stream, const uint32 N, W *lmem)
 
template<typename StreamType , typename SymbolType , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename W >
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE PackedStream
< const_cached_iterator< const
W * >, SymbolType,
SYMBOL_SIZE_T, BIG_ENDIAN_T >
::iterator 
make_local_string (const PackedStream< StreamType, SymbolType, SYMBOL_SIZE_T, BIG_ENDIAN_T > in_stream, const uint32 N, const uint2 substring_range, const uint32 rev_flag, W *lmem)
 
void extract_radices (const priv::string_set_2bit_be string_set, const uint32 n_suffixes, const uint32 word_begin, const uint32 word_end, const uint32 word_bits, const uint2 *suffixes, uint32 *radices, uint8 *symbols=NULL)
 
void extract_radices (const priv::string_set_2bit_u64_be string_set, const uint32 n_suffixes, const uint32 word_begin, const uint32 word_end, const uint32 word_bits, const uint2 *suffixes, uint64 *radices, uint8 *symbols=NULL)
 
template<typename VectorType >
void alloc_storage (VectorType &vec, const uint64 size)
 
template<typename storage_type >
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE storage_type 
clearmask (const uint32 n)
 
template<uint32 WORD_BITS, uint32 DOLLAR_BITS, uint32 SYMBOL_SIZE, typename string_type , typename index_type >
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE uint32 
extract_word_generic (const string_type string, const index_type string_len, const index_type suffix_idx, const uint32 w)
 
template<uint32 SYMBOL_SIZE, uint32 WORD_BITS, uint32 DOLLAR_BITS>
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE uint32 
symbols_per_word ()
 
template<uint32 WORD_BITS, uint32 DOLLAR_BITS, uint32 SYMBOL_SIZE, typename storage_type , typename index_type , typename sufindex_type >
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE
std::iterator_traits
< storage_type >::value_type 
extract_word_packed (const storage_type base_words, const index_type string_len, const index_type string_off, const sufindex_type suffix_idx, const uint32 w)
 
template<uint32 WORD_BITS, uint32 DOLLAR_BITS, uint32 SYMBOL_SIZE, typename storage_type , typename index_type , typename sufindex_type , typename output_iterator >
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE void 
extract_word_packed (const storage_type base_words, const index_type string_len, const index_type string_off, const sufindex_type suffix_idx, const uint32 word_begin, const uint32 word_end, output_iterator words)
 
template<uint32 SYMBOL_SIZE, uint32 BITS, uint32 DOLLAR_BITS, typename string_type , typename index_iterator , typename radix_iterator >
void flatten_string_suffixes (const uint64 string_len, const string_type &string, const uint32 word_idx, const index_iterator indices_begin, const index_iterator indices_end, radix_iterator radices)
 
template<typename input_iterator , typename output_iterator , typename index_type >
__global__ void simple_device_copy_kernel (const uint32 n, const input_iterator input, output_iterator output, const index_type offset)
 
template<typename input_iterator , typename storage_type , uint32 SYMBOL_SIZE, bool BIG_ENDIAN, typename index_type >
__global__ void packed_device_copy_kernel (const uint32 n, const input_iterator input, PackedStream< storage_type, uint8, SYMBOL_SIZE, BIG_ENDIAN, index_type > output, const index_type offset)
 
template<typename input_iterator , typename output_iterator , typename index_type >
void device_copy (const uint32 n, const input_iterator input, const output_iterator output, const index_type offset)
 
template<typename input_iterator , typename slot_iterator , typename range_iterator , typename storage_type , uint32 SYMBOL_SIZE, bool BIG_ENDIAN, typename index_type >
__global__ void device_scatter_kernel (const uint32 begin, const uint32 end, const range_iterator ranges, const input_iterator input, const slot_iterator slots, PackedStream< storage_type, uint8, SYMBOL_SIZE, BIG_ENDIAN, index_type > output)
 
template<typename input_iterator , typename slot_iterator , typename output_iterator >
void device_scatter (const uint32 n, const input_iterator input, const slot_iterator slots, output_iterator output)
 
void pack_flags (const uint32 n, const uint8 *flags, uint32 *comp_flags)
 
void build_head_flags (const uint32 n, const uint32 *keys, uint8 *flags)
 
void build_head_flags (const uint32 n, const uint64 *keys, uint8 *flags)
 

Typedef Documentation

typedef PackedStream<uint32*,uint8,2u,true,uint64> nvbio::priv::string_2bit_be

Definition at line 94 of file sufsort_priv.h.

typedef PackedStream<uint32*,uint8,2u,false,uint64> nvbio::priv::string_2bit_le

Definition at line 91 of file sufsort_priv.h.

typedef PackedStream<uint32*,uint8,4u,true,uint64> nvbio::priv::string_4bit_be

Definition at line 95 of file sufsort_priv.h.

typedef PackedStream<uint32*,uint8,4u,false,uint64> nvbio::priv::string_4bit_le

Definition at line 92 of file sufsort_priv.h.

typedef PackedStream<uint32*,uint8,8u,true,uint64> nvbio::priv::string_8bit_be

Definition at line 96 of file sufsort_priv.h.

typedef PackedStream<uint32*,uint8,8u,false,uint64> nvbio::priv::string_8bit_le

Definition at line 93 of file sufsort_priv.h.

typedef ConcatenatedStringSet< PackedStream<uint32*,uint8,2u,false,uint64>, uint64*> nvbio::priv::string_set_2bit

Definition at line 73 of file sufsort_priv.h.

typedef ConcatenatedStringSet< PackedStream<uint32*,uint8,2u,true,uint64>, uint64*> nvbio::priv::string_set_2bit_be

Definition at line 85 of file sufsort_priv.h.

typedef ConcatenatedStringSet< PackedStream<uint64*,uint8,2u,true,uint64>, uint64*> nvbio::priv::string_set_2bit_u64_be

Definition at line 89 of file sufsort_priv.h.

typedef ConcatenatedStringSet< PackedStream<uint32*,uint8,2u,false,uint64>, uint64*> nvbio::priv::string_set_4bit

Definition at line 77 of file sufsort_priv.h.

typedef ConcatenatedStringSet< PackedStream<uint32*,uint8,8u,false,uint64>, uint64*> nvbio::priv::string_set_8bit

Definition at line 81 of file sufsort_priv.h.

Enumeration Type Documentation

A functor returning the given component of a suffix

Enumerator
SUFFIX_ID 
STRING_ID 

Definition at line 264 of file sufsort_priv.h.

Function Documentation

template<typename VectorType >
void nvbio::priv::alloc_storage ( VectorType &  vec,
const uint64  size 
)

Definition at line 121 of file sufsort_priv.h.

void nvbio::priv::build_head_flags ( const uint32  n,
const uint32 *  keys,
uint8 *  flags 
)

build a set of head flags looking at adjacent keys

void nvbio::priv::build_head_flags ( const uint32  n,
const uint64 *  keys,
uint8 *  flags 
)

build a set of head flags looking at adjacent keys

template<typename storage_type >
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE storage_type nvbio::priv::clearmask ( const uint32  n)

set the last n bits to 0

Definition at line 142 of file sufsort_priv.h.

template<typename input_iterator , typename output_iterator , typename index_type >
void nvbio::priv::device_copy ( const uint32  n,
const input_iterator  input,
const output_iterator  output,
const index_type  offset 
)

copy a set of n symbols from a given input stream to a given output stream

Definition at line 2133 of file sufsort_priv.h.

template<typename input_iterator , typename slot_iterator , typename output_iterator >
void nvbio::priv::device_scatter ( const uint32  n,
const input_iterator  input,
const slot_iterator  slots,
output_iterator  output 
)

scatter a set of symbols into a sparse set of slots of a given output stream

Definition at line 2252 of file sufsort_priv.h.

template<typename input_iterator , typename slot_iterator , typename range_iterator , typename storage_type , uint32 SYMBOL_SIZE, bool BIG_ENDIAN, typename index_type >
__global__ void nvbio::priv::device_scatter_kernel ( const uint32  begin,
const uint32  end,
const range_iterator  ranges,
const input_iterator  input,
const slot_iterator  slots,
PackedStream< storage_type, uint8, SYMBOL_SIZE, BIG_ENDIAN, index_type >  output 
)

an auxiliary kernel to scatter a set of symbols into a sparse set of slots of a given output stream; this kernel copies a full range of symbols per thread, where individual ranges are guaranteed to touch distinct words of the underlying storage where the output is packed.

Definition at line 2147 of file sufsort_priv.h.

void nvbio::priv::extract_radices ( const priv::string_set_2bit_be  string_set,
const uint32  n_suffixes,
const uint32  word_begin,
const uint32  word_end,
const uint32  word_bits,
const uint2 *  suffixes,
uint32 *  radices,
uint8 *  symbols = NULL 
)
void nvbio::priv::extract_radices ( const priv::string_set_2bit_u64_be  string_set,
const uint32  n_suffixes,
const uint32  word_begin,
const uint32  word_end,
const uint32  word_bits,
const uint2 *  suffixes,
uint64 *  radices,
uint8 *  symbols = NULL 
)
template<uint32 WORD_BITS, uint32 DOLLAR_BITS, uint32 SYMBOL_SIZE, typename string_type , typename index_type >
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE uint32 nvbio::priv::extract_word_generic ( const string_type  string,
const index_type  string_len,
const index_type  suffix_idx,
const uint32  w 
)

Definition at line 284 of file sufsort_priv.h.

template<uint32 WORD_BITS, uint32 DOLLAR_BITS, uint32 SYMBOL_SIZE, typename storage_type , typename index_type , typename sufindex_type >
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE std::iterator_traits<storage_type>::value_type nvbio::priv::extract_word_packed ( const storage_type  base_words,
const index_type  string_len,
const index_type  string_off,
const sufindex_type  suffix_idx,
const uint32  w 
)

Definition at line 328 of file sufsort_priv.h.

template<uint32 WORD_BITS, uint32 DOLLAR_BITS, uint32 SYMBOL_SIZE, typename storage_type , typename index_type , typename sufindex_type , typename output_iterator >
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE void nvbio::priv::extract_word_packed ( const storage_type  base_words,
const index_type  string_len,
const index_type  string_off,
const sufindex_type  suffix_idx,
const uint32  word_begin,
const uint32  word_end,
output_iterator  words 
)

Definition at line 424 of file sufsort_priv.h.

template<uint32 SYMBOL_SIZE, uint32 BITS, uint32 DOLLAR_BITS, typename string_type , typename index_iterator , typename radix_iterator >
void nvbio::priv::flatten_string_suffixes ( const uint64  string_len,
const string_type &  string,
const uint32  word_idx,
const index_iterator  indices_begin,
const index_iterator  indices_end,
radix_iterator  radices 
)

extract the given radix from the given suffixes of a string

Definition at line 1317 of file sufsort_priv.h.

template<typename StreamType , typename SymbolType , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename W >
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE PackedStream<const_cached_iterator<const W*>,SymbolType,SYMBOL_SIZE_T,BIG_ENDIAN_T>::iterator nvbio::priv::make_local_string ( const PackedStream< StreamType, SymbolType, SYMBOL_SIZE_T, BIG_ENDIAN_T >  in_stream,
const uint32  N,
W *  lmem 
)

Definition at line 49 of file packedstream_loader_inl.h.

template<typename StreamType , typename SymbolType , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename W >
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE PackedStream<const_cached_iterator<const W*>,SymbolType,SYMBOL_SIZE_T,BIG_ENDIAN_T>::iterator nvbio::priv::make_local_string ( const PackedStream< StreamType, SymbolType, SYMBOL_SIZE_T, BIG_ENDIAN_T >  in_stream,
const uint32  N,
const uint2  substring_range,
const uint32  rev_flag,
W *  lmem 
)

Definition at line 82 of file packedstream_loader_inl.h.

void nvbio::priv::pack_flags ( const uint32  n,
const uint8 *  flags,
uint32 *  comp_flags 
)

pack a set of head flags into a bit-packed array

template<typename input_iterator , typename storage_type , uint32 SYMBOL_SIZE, bool BIG_ENDIAN, typename index_type >
__global__ void nvbio::priv::packed_device_copy_kernel ( const uint32  n,
const input_iterator  input,
PackedStream< storage_type, uint8, SYMBOL_SIZE, BIG_ENDIAN, index_type >  output,
const index_type  offset 
)

a simple auxiliary kernel to perform generic device-to-device copies, specialized for packed streams

Definition at line 2044 of file sufsort_priv.h.

template<typename InputIterator , typename InputStream , typename Symbol , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename IndexType >
NVBIO_HOST_DEVICE void nvbio::priv::serial_assign ( const IndexType  input_len,
InputIterator  input_string,
PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >  packed_string 
)

Definition at line 1105 of file packedstream_inl.h.

template<typename input_iterator , typename output_iterator , typename index_type >
__global__ void nvbio::priv::simple_device_copy_kernel ( const uint32  n,
const input_iterator  input,
output_iterator  output,
const index_type  offset 
)

a simple auxiliary kernel to perform generic device-to-device copies, specialized for packed streams

Definition at line 2029 of file sufsort_priv.h.

template<uint32 SYMBOL_SIZE, uint32 WORD_BITS, uint32 DOLLAR_BITS>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE uint32 nvbio::priv::symbols_per_word ( )

return how many symbols are encoded per word

Definition at line 320 of file sufsort_priv.h.