3#include <cuda/__cmath/ceil_div.h>
13template <
typename Config>
19template <
typename Config>
25template <
typename Config>
43template <
typename Config>
57template <
typename Config>
68template <
typename Config>
89template <
typename Config>
126template <
typename Config>
__device__ __forceinline__ uint8_t dense_packed_symbol_at(const uint64_t *words, uint64_t symbol_index)
Decodes one packed symbol at global index symbol_index.
__device__ __forceinline__ bool prepare_dense_packed_tiles(const uint64_t *words, uint64_t block_start_kmer, uint64_t block_kmers, uint64_t *word_tile, uint8_t *sequence_tile)
Fills sequence_tile with encoded symbols for k-mers starting at block_start_kmer.
constexpr uint64_t dense_packed_symbols_per_word()
Encoded symbols stored in each uint64_t word for Config.
constexpr uint64_t dense_packed_kmer_count(uint64_t num_symbols)
Returns the number of k-mer windows in a dense packed symbol sequence.
__device__ __forceinline__ uint8_t dense_packed_symbol_at_local(const uint64_t *word_tile, uint64_t first_word_index, uint64_t symbol_index)
Decodes one packed symbol from a block-local word tile.
constexpr uint64_t dense_packed_word_count(uint64_t num_symbols)
Returns the number of uint64_t words required for num_symbols encoded symbols.
__global__ void pack_dense_sequence_kernel(const char *sequence, uint64_t num_symbols, uint64_t *words)
Packs an encoded byte sequence into dense symbolBits-wide uint64_t words.
consteval bool separatorPositionAlwaysEncodesInvalid(char *input, uint64_t separatorPosition, uint64_t index)
Recursively tests whether placing the separator byte at any position in an input of valid bytes alway...
static constexpr uint64_t symbolWidth
Input bytes per symbol.
static constexpr uint64_t symbolMask
Low symbolBits mask for one encoded symbol.
static constexpr uint64_t cudaBlockSize
CUDA threads per kernel block.
static constexpr uint16_t k
K-mer length in symbols.
static constexpr uint64_t symbolBits
Bits per packed symbol in a uint64_t k-mer.
A span that is assumed to point to device-accessible memory.