NVBIO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Typedefs | Enumerations | Functions
sufsort_priv.h File Reference
#include <cub/cub.cuh>
#include <mgpuhost.cuh>
#include <moderngpu.cuh>
#include <nvbio/strings/string_set.h>
#include <nvbio/basic/thrust_view.h>
#include <nvbio/basic/cuda/sort.h>
#include <nvbio/basic/cuda/timer.h>
#include <nvbio/basic/cuda/ldg.h>
#include <nvbio/basic/cuda/primitives.h>
#include <thrust/host_vector.h>
#include <thrust/device_vector.h>
#include <thrust/adjacent_difference.h>
#include <thrust/binary_search.h>
#include <thrust/iterator/constant_iterator.h>

Go to the source code of this file.

Classes

struct  nvbio::priv::word_selector< BITS >
 
struct  nvbio::priv::word_selector< 4 >
 
struct  nvbio::priv::word_selector< 6 >
 
struct  nvbio::priv::word_selector< 8 >
 
struct  nvbio::priv::word_selector< 10 >
 
struct  nvbio::priv::word_selector< 12 >
 
struct  nvbio::priv::word_selector< 14 >
 
struct  nvbio::priv::word_selector< 16 >
 
struct  nvbio::priv::word_selector< 18 >
 
struct  nvbio::priv::word_selector< 20 >
 
struct  nvbio::priv::word_selector< 22 >
 
struct  nvbio::priv::word_selector< 24 >
 
struct  nvbio::priv::word_selector< 26 >
 
struct  nvbio::priv::word_selector< 28 >
 
struct  nvbio::priv::word_selector< 30 >
 
struct  nvbio::priv::word_selector< 32 >
 
struct  nvbio::priv::word_selector< 48 >
 
struct  nvbio::priv::word_selector< 64 >
 
struct  nvbio::priv::in_range_functor
 
struct  nvbio::priv::minus_one
 
struct  nvbio::priv::offset_functor
 
struct  nvbio::priv::add_divide_functor
 
struct  nvbio::priv::length_functor< string_set_type >
 
struct  nvbio::priv::suffix_offset_functor
 
struct  nvbio::priv::suffix_component_functor< COMP >
 
struct  nvbio::priv::localize_suffix_functor
 
struct  nvbio::priv::local_set_suffix_word_functor< SYMBOL_SIZE, WORD_BITS, DOLLAR_BITS, string_set_type, word_type >
 
struct  nvbio::priv::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  nvbio::priv::global_set_suffix_word_functor< SYMBOL_SIZE, WORD_BITS, DOLLAR_BITS, string_set_type, word_type >
 
struct  nvbio::priv::string_suffix_word_functor< SYMBOL_SIZE, WORD_BITS, DOLLAR_BITS, string_type, word_type >
 
struct  nvbio::priv::string_suffix_word_functor< SYMBOL_SIZE, WORD_BITS, DOLLAR_BITS, PackedStream< storage_type, symbol_type, SYMBOL_SIZE, true, index_type >, word_type >
 
struct  nvbio::priv::string_suffix_difference< string_type >
 
struct  nvbio::priv::string_suffix_less< SYMBOL_SIZE, string_type >
 
struct  nvbio::priv::string_bwt_functor< string_type >
 
struct  nvbio::priv::string_set_bwt_functor< string_set_type >
 
struct  nvbio::priv::remove_singletons
 
struct  nvbio::priv::merge_keys
 
struct  nvbio::priv::Bits< BITS, DOLLAR_BITS >
 
struct  nvbio::priv::SetSuffixFlattener< SYMBOL_SIZE >
 
struct  nvbio::priv::ChunkLoader< SYMBOL_SIZE, BIG_ENDIAN, storage_type, offsets_iterator, input_tag, output_tag >
 
struct  nvbio::priv::ChunkLoader< SYMBOL_SIZE, BIG_ENDIAN, storage_type, offsets_iterator, host_tag, device_tag >
 
struct  nvbio::priv::ChunkLoader< SYMBOL_SIZE, BIG_ENDIAN, storage_type, offsets_iterator, system_tag, system_tag >
 
struct  nvbio::priv::StringSuffixBucketer< SYMBOL_SIZE, N_BITS, DOLLAR_BITS >
 
struct  nvbio::priv::HostStringSetRadices< string_set_type, SYMBOL_SIZE, DOLLAR_BITS, WORD_BITS >
 
struct  nvbio::priv::DeviceStringSetRadices< string_set_type, SYMBOL_SIZE, DOLLAR_BITS, WORD_BITS >
 
struct  nvbio::priv::DollarExtractor
 
struct  nvbio::priv::device_copy_dispatch< input_iterator, output_iterator, index_type >
 
struct  nvbio::priv::device_copy_dispatch< input_iterator, PackedStream< storage_type, uint8, SYMBOL_SIZE, BIG_ENDIAN, index_type >, index_type >
 
struct  nvbio::priv::device_scatter_dispatch< input_iterator, slot_iterator, output_iterator >
 
struct  nvbio::priv::device_scatter_dispatch< input_iterator, slot_iterator, PackedStream< storage_type, uint8, SYMBOL_SIZE, BIG_ENDIAN, index_type > >
 

Namespaces

 nvbio
 Define a vector_view POD type and plain_view() for std::vector.
 
 nvbio::priv
 

Typedefs

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

Enumerations

enum  nvbio::priv::SuffixComponent { nvbio::priv::SUFFIX_ID = 0, nvbio::priv::STRING_ID = 1 }
 

Functions

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<typename VectorType >
void nvbio::priv::alloc_storage (VectorType &vec, const uint64 size)
 
template<typename storage_type >
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE storage_type 
nvbio::priv::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 
nvbio::priv::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 
nvbio::priv::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 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
void nvbio::priv::pack_flags (const uint32 n, const uint8 *flags, uint32 *comp_flags)
 
void nvbio::priv::build_head_flags (const uint32 n, const uint32 *keys, uint8 *flags)
 
void nvbio::priv::build_head_flags (const uint32 n, const uint64 *keys, uint8 *flags)