NVBIO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Methods | Public Members | List of all members
nvbio::priv::SetSuffixFlattener< SYMBOL_SIZE > Struct Template Reference

Detailed description

template< uint32 SYMBOL_SIZE>
struct nvbio::priv::SetSuffixFlattener< SYMBOL_SIZE >

A helper class allowing to "flatten" the suffixes in a given string-set, i.e. to extract all of them word-by-word in a flattened array.

Definition at line 1031 of file sufsort_priv.h.

#include <sufsort_priv.h>

Public Methods

 SetSuffixFlattener (mgpu::ContextPtr _mgpu)
 
void clear_timers ()
 
void reserve (const uint32 n_strings, const uint32 n_suffixes)
 
uint64 needed_device_memory (const uint32 n_strings, const uint32 n_suffixes) const
 
template<typename string_set_type >
void set (const string_set_type &string_set, const bool empty_suffixes=true)
 
template<uint32 BITS, uint32 DOLLAR_BITS, typename string_set_type , typename index_iterator , typename radix_iterator >
void flatten (const string_set_type &string_set, const uint32 word_idx, const Bits< BITS, DOLLAR_BITS > word_bits, const index_iterator indices, radix_iterator radices)
 
template<typename string_set_type >
uint32 max_length (const string_set_type &string_set, const bool empty_suffixes=true)
 
template<typename string_set_type , typename index_iterator >
uint32 max_length (const string_set_type &string_set, const index_iterator indices_begin, const index_iterator indices_end)
 
uint64 allocated_device_memory () const
 

Public Members

uint32 n_suffixes
 number of suffixes in the string set More...
 
thrust::device_vector< uint32cum_lengths
 cumulative string lengths More...
 
thrust::device_vector< uint32string_ids
 
thrust::device_vector< uint8temp_storage
 
float d_scan_time
 
float d_search_time
 
mgpu::ContextPtr m_mgpu
 

Constructor & Destructor Documentation

template<uint32 SYMBOL_SIZE>
nvbio::priv::SetSuffixFlattener< SYMBOL_SIZE >::SetSuffixFlattener ( mgpu::ContextPtr  _mgpu)
inline

Definition at line 1033 of file sufsort_priv.h.

Member Function Documentation

template<uint32 SYMBOL_SIZE>
uint64 nvbio::priv::SetSuffixFlattener< SYMBOL_SIZE >::allocated_device_memory ( ) const
inline

return the amount of used device memory

Definition at line 1169 of file sufsort_priv.h.

template<uint32 SYMBOL_SIZE>
void nvbio::priv::SetSuffixFlattener< SYMBOL_SIZE >::clear_timers ( )
inline

clear internal timers

Definition at line 1040 of file sufsort_priv.h.

template<uint32 SYMBOL_SIZE>
template<uint32 BITS, uint32 DOLLAR_BITS, typename string_set_type , typename index_iterator , typename radix_iterator >
void nvbio::priv::SetSuffixFlattener< SYMBOL_SIZE >::flatten ( const string_set_type &  string_set,
const uint32  word_idx,
const Bits< BITS, DOLLAR_BITS >  word_bits,
const index_iterator  indices,
radix_iterator  radices 
)
inline

extract the given radix of all suffixes

Definition at line 1111 of file sufsort_priv.h.

template<uint32 SYMBOL_SIZE>
template<typename string_set_type >
uint32 nvbio::priv::SetSuffixFlattener< SYMBOL_SIZE >::max_length ( const string_set_type &  string_set,
const bool  empty_suffixes = true 
)
inline

compute the maximum suffix length among the specified range

Definition at line 1134 of file sufsort_priv.h.

template<uint32 SYMBOL_SIZE>
template<typename string_set_type , typename index_iterator >
uint32 nvbio::priv::SetSuffixFlattener< SYMBOL_SIZE >::max_length ( const string_set_type &  string_set,
const index_iterator  indices_begin,
const index_iterator  indices_end 
)
inline

compute the maximum suffix length among the specified range

Definition at line 1150 of file sufsort_priv.h.

template<uint32 SYMBOL_SIZE>
uint64 nvbio::priv::SetSuffixFlattener< SYMBOL_SIZE >::needed_device_memory ( const uint32  n_strings,
const uint32  n_suffixes 
) const
inline

return the amount of device memory needed

Definition at line 1056 of file sufsort_priv.h.

template<uint32 SYMBOL_SIZE>
void nvbio::priv::SetSuffixFlattener< SYMBOL_SIZE >::reserve ( const uint32  n_strings,
const uint32  n_suffixes 
)
inline

reserve storage

Definition at line 1048 of file sufsort_priv.h.

template<uint32 SYMBOL_SIZE>
template<typename string_set_type >
void nvbio::priv::SetSuffixFlattener< SYMBOL_SIZE >::set ( const string_set_type &  string_set,
const bool  empty_suffixes = true 
)
inline

initialize this flattener, building the auxiliary data-structures needed to extract the radices

Definition at line 1065 of file sufsort_priv.h.

Member Data Documentation

template<uint32 SYMBOL_SIZE>
thrust::device_vector<uint32> nvbio::priv::SetSuffixFlattener< SYMBOL_SIZE >::cum_lengths

cumulative string lengths

Definition at line 1178 of file sufsort_priv.h.

template<uint32 SYMBOL_SIZE>
float nvbio::priv::SetSuffixFlattener< SYMBOL_SIZE >::d_scan_time

Definition at line 1185 of file sufsort_priv.h.

template<uint32 SYMBOL_SIZE>
float nvbio::priv::SetSuffixFlattener< SYMBOL_SIZE >::d_search_time

Definition at line 1186 of file sufsort_priv.h.

template<uint32 SYMBOL_SIZE>
mgpu::ContextPtr nvbio::priv::SetSuffixFlattener< SYMBOL_SIZE >::m_mgpu

Definition at line 1187 of file sufsort_priv.h.

template<uint32 SYMBOL_SIZE>
uint32 nvbio::priv::SetSuffixFlattener< SYMBOL_SIZE >::n_suffixes

number of suffixes in the string set

Definition at line 1177 of file sufsort_priv.h.

template<uint32 SYMBOL_SIZE>
thrust::device_vector<uint32> nvbio::priv::SetSuffixFlattener< SYMBOL_SIZE >::string_ids

a vector containing the string index corresponding to each flattened suffixes; i.e. if the set contains 3 strings of length (3, 2, 5), the string ids will be the vector (0,0,0,1,1,2,2,2,2,2).

Definition at line 1179 of file sufsort_priv.h.

template<uint32 SYMBOL_SIZE>
thrust::device_vector<uint8> nvbio::priv::SetSuffixFlattener< SYMBOL_SIZE >::temp_storage

Definition at line 1183 of file sufsort_priv.h.


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