cuDDL
Loading...
Searching...
No Matches
Namespaces | Functions | Variables
hash.cuh File Reference
#include <cuda/std/bit>
#include <cuda/std/cstdint>

Go to the source code of this file.

Namespaces

namespace  cuddl
 Batch operations over contiguous device rows.
 
namespace  cuddl::detail
 

Functions

__host__ __device__ constexpr uint64_t cuddl::detail::splitmix64 (uint64_t value) noexcept
 SplitMix64 finalizer, applied to a packed k-mer XOR the domain seed.
 
__host__ __device__ constexpr uint64_t cuddl::detail::hash_kmer (uint64_t packed_kmer) noexcept
 Hashes a canonical packed k-mer into the value space used by DDL registers.
 
template<size_t BucketCount>
__host__ __device__ constexpr size_t cuddl::detail::bucket_of (uint64_t hash) noexcept
 Selects the register bucket for hash given a power-of-two BucketCount.
 
constexpr __host__ __device__ __forceinline__ uint64_t cuddl::detail::rotl64 (uint64_t x, int8_t r)
 Rotates x left by r bits.
 
template<typename T >
__host__ __device__ __forceinline__ T cuddl::detail::load_chunk (const uint8_t *data, uint64_t index)
 Loads a chunk of type T from data at byte offset index*sizeof(T).
 
constexpr __host__ __device__ __forceinline__ uint64_t cuddl::detail::finalize (uint64_t h)
 Applies the xxHash-64 final mixing (avalanche) step.
 
__host__ __device__ uint64_t cuddl::detail::xxhash64 (const uint8_t *bytes, uint64_t size, uint64_t seed)
 Computes xxHash-64 over a byte range without allocating or copying it.
 
template<typename T >
__host__ __device__ uint64_t cuddl::detail::xxhash64 (const T &key, uint64_t seed=0)
 Computes xxHash-64 over the raw bytes of a value.
 

Variables

constexpr uint64_t cuddl::detail::seed = 42
 Domain separation constant folded into every packed k-mer before hashing.
 
constexpr uint64_t cuddl::detail::PRIME64_1 = 11400714785074694791ULL
 xxHash-64 round primes.
 
constexpr uint64_t cuddl::detail::PRIME64_2 = 14029467366897019727ULL
 
constexpr uint64_t cuddl::detail::PRIME64_3 = 1609587929392839161ULL
 
constexpr uint64_t cuddl::detail::PRIME64_4 = 9650029242287828579ULL
 
constexpr uint64_t cuddl::detail::PRIME64_5 = 2870177450012600261ULL