warpcore 0.0.1
Hashing at the Speed of Light on modern CUDA-accelerators
warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme > Class Template Reference

bucket list hash table More...

Public Types

using handle_type = typename ValueStore::handle_type
 
using key_type = Key
 
using value_type = Value
 
using index_type = index_t
 
using status_type = Status
 

Public Member Functions

__host__ BucketListHashTable (const index_type key_capacity, const index_type value_capacity, const key_type seed=defaults::seed< key_type >(), const float grow_factor=1.1, const index_type min_bucket_size=1, const index_type max_bucket_size=max_bucket_size(), const index_type max_values_per_key=handle_type::max_value_count(), const bool no_init=false) noexcept
 constructor More...
 
__host____device__ BucketListHashTable (const BucketListHashTable &o) noexcept
 copy-constructor (shallow) More...
 
__host__ BucketListHashTable (BucketListHashTable &&o) noexcept
 move-constructor More...
 
__host__ void init (const key_type seed, const cudaStream_t stream=0) noexcept
 (re)initialize the hash table More...
 
__host__ void init (const cudaStream_t stream=0) noexcept
 (re)initialize the hash table More...
 
__device__ status_type insert (const key_type key_in, const value_type &value_in, const cg::thread_block_tile< cg_size()> &group, const index_type probing_length=defaults::probing_length()) noexcept
 inserts a key/value pair into the hash table More...
 
template<class StatusHandler = defaults::status_handler_t>
__host__ void insert (const key_type *const keys_in, const value_type *const values_in, const index_type num_in, const cudaStream_t stream=0, const index_type probing_length=defaults::probing_length(), typename StatusHandler::base_type *const status_out=nullptr) noexcept
 insert a set of keys into the hash table More...
 
__device__ status_type retrieve (const key_type key_in, value_type *const values_out, index_type &num_out, const cg::thread_block_tile< cg_size()> &group, const index_type probing_length=defaults::probing_length()) const noexcept
 retrieves a key from the hash table More...
 
template<class StatusHandler = defaults::status_handler_t>
__host__ void retrieve (const key_type *const keys_in, const index_type num_in, index_type *const begin_offsets_out, index_type *const end_offsets_out, value_type *const values_out, index_type &num_out, const cudaStream_t stream=0, const index_type probing_length=defaults::probing_length(), typename StatusHandler::base_type *const status_out=nullptr) const noexcept
 retrieve a set of keys from the hash table More...
 
template<class Func >
__device__ status_type for_each (Func f, const key_type key_in, const cg::thread_block_tile< cg_size()> &group, const index_type probing_length=defaults::probing_length()) const noexcept
 applies a funtion over all values of a corresponding key More...
 
__host__ void retrieve_all (key_type *const keys_out, index_type &num_keys_out, index_type *const begin_offsets_out, index_type *const end_offsets_out, value_type *const values_out, value_type &num_values_out, const cudaStream_t stream=0) const noexcept
 retrieves all elements from the hash table \info this method has a dry-run mode where it only calculates the needed array sizes in case no memory (aka nullptr ) is provided \info this method implements a multi-stage dry-run mode More...
 
__host__ void retrieve_all_keys (key_type *const keys_out, index_type &num_out, const cudaStream_t stream=0) const noexcept
 retrieves the set of all keys stored inside the hash table More...
 
__host__ float key_load_factor (const cudaStream_t stream=0) const noexcept
 get load factor of the key store More...
 
__host__ float value_load_factor (const cudaStream_t stream=0) const noexcept
 get load factor of the value store More...
 
__host__ index_type bytes_total () const noexcept
 get the the total number of bytes occupied by this data structure More...
 
__host__ index_type bytes_keys (const cudaStream_t stream=0) const noexcept
 get the the number of bytes in this data structure occupied by keys More...
 
__host__ index_type bytes_values (const cudaStream_t stream=0) const noexcept
 get the the number of bytes in this data structure occupied by values More...
 
__host__ index_type bytes_payload (const cudaStream_t stream=0) const noexcept
 get the the number of bytes in this data structure occupied by actual information More...
 
__host__ float storage_density (const cudaStream_t stream=0) const noexcept
 current storage density of the hash table More...
 
__host__ float relative_storage_density (const cudaStream_t stream=0) const noexcept
 current relative storage density of the hash table More...
 
__host____device__ bool is_initialized () const noexcept
 indicates if the hash table is properly initialized More...
 
__host__ status_type peek_status (const cudaStream_t stream=0) const noexcept
 get the status of the hash table More...
 
__host__ status_type pop_status (const cudaStream_t stream=0) noexcept
 get and reset the status of the hash table More...
 
__host__ index_type key_capacity () const noexcept
 get the key capacity of the hash table More...
 
__host__ index_type value_capacity () const noexcept
 get the maximum value capacity of the hash table More...
 
__host__ index_type num_keys (const cudaStream_t stream=0) const noexcept
 number of keys stored inside the hash table More...
 
__device__ status_type num_values (const key_type key_in, index_type &num_out, const cg::thread_block_tile< cg_size()> &group, const index_type probing_length=defaults::probing_length()) const noexcept
 get number of values to a corresponding key inside the hash table More...
 
template<class StatusHandler = defaults::status_handler_t>
__host__ void num_values (const key_type *const keys_in, const index_type num_in, index_type &num_out, index_type *const num_per_key_out=nullptr, const cudaStream_t stream=0, const index_type probing_length=defaults::probing_length(), typename StatusHandler::base_type *const status_out=nullptr) const noexcept
 get number of values to a corresponding set of keys inside the hash table More...
 
__host__ index_type num_values (const cudaStream_t stream=0) const noexcept
 get number of values inside the hash table More...
 
__host____device__ bool is_copy () const noexcept
 indicates if this object is a shallow copy More...
 

Static Public Member Functions

static constexpr __host____device__ key_type empty_key () noexcept
 get empty key More...
 
static constexpr __host____device__ key_type tombstone_key () noexcept
 get tombstone key More...
 
static constexpr __host____device__ bool is_valid_key (const key_type key) noexcept
 checks if key is equal to (EmptyKey||TombstoneKey) More...
 
static constexpr __host____device__ index_type cg_size () noexcept
 get cooperative group size More...
 
static constexpr __host____device__ index_type max_bucket_size () noexcept
 maximum bucket size More...
 

Friends

template<class Core , class StatusHandler >
GLOBALQUALIFIER friend void kernels::retrieve (const typename Core::key_type *const, const index_type, const index_type *const, const index_type *const, typename Core::value_type *const, const Core, const index_type, typename StatusHandler::base_type *const)
 

Detailed Description

template<class Key, class Value, Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
class warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >

bucket list hash table

Template Parameters
Keykey type (std::uint32_t or std::uint64_t)
Valuevalue type
EmptyKeykey which represents an empty slot
TombstoneKeykey which represents an erased slot
ValueStorestorage class from warpcore::storage::multi_value
ProbingSchemeprobing scheme from warpcore::probing_schemes

Definition at line 24 of file bucket_list_hash_table.cuh.

Member Typedef Documentation

◆ handle_type

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
using warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::handle_type = typename ValueStore::handle_type

Definition at line 32 of file bucket_list_hash_table.cuh.

◆ index_type

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
using warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::index_type = index_t

Definition at line 47 of file bucket_list_hash_table.cuh.

◆ key_type

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
using warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::key_type = Key

Definition at line 45 of file bucket_list_hash_table.cuh.

◆ status_type

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
using warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::status_type = Status

Definition at line 48 of file bucket_list_hash_table.cuh.

◆ value_type

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
using warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::value_type = Value

Definition at line 46 of file bucket_list_hash_table.cuh.

Constructor & Destructor Documentation

◆ BucketListHashTable() [1/3]

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
__host__ warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::BucketListHashTable ( const index_type  key_capacity,
const index_type  value_capacity,
const key_type  seed = defaults::seed<key_type>(),
const float  grow_factor = 1.1,
const index_type  min_bucket_size = 1,
const index_type  max_bucket_size = max_bucket_size(),
const index_type  max_values_per_key = handle_type::max_value_count(),
const bool  no_init = false 
)
inlineexplicitnoexcept

constructor

Parameters
[in]key_capacityguaranteed number of key slots in the hash table
[in]value_capacitytotal number of value slots
[in]seedrandom seed
[in]grow_factorbucket grow factor for warpcore::storage::multi_value::BucketListStore
[in]min_bucket_sizeinitial size of value buckets for warpcore::storage::multi_value::BucketListStore
[in]max_bucket_sizebucket size of warpcore::storage::multi_value::BucketListStore after which no more growth occurs
[in]max_values_per_keymaximum number of values to store per key

Definition at line 105 of file bucket_list_hash_table.cuh.

◆ BucketListHashTable() [2/3]

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
__host____device__ warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::BucketListHashTable ( const BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme > &  o)
inlinenoexcept

copy-constructor (shallow)

Parameters
[in]objectto be copied

Definition at line 128 of file bucket_list_hash_table.cuh.

◆ BucketListHashTable() [3/3]

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
__host__ warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::BucketListHashTable ( BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme > &&  o)
inlinenoexcept

move-constructor

Parameters
[in]objectto be moved

Definition at line 139 of file bucket_list_hash_table.cuh.

Member Function Documentation

◆ bytes_keys()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
__host__ index_type warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::bytes_keys ( const cudaStream_t  stream = 0) const
inlinenoexcept

get the the number of bytes in this data structure occupied by keys

Parameters
streamCUDA stream in which this operation is executed in
Returns
bytes

Definition at line 641 of file bucket_list_hash_table.cuh.

◆ bytes_payload()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
__host__ index_type warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::bytes_payload ( const cudaStream_t  stream = 0) const
inlinenoexcept

get the the number of bytes in this data structure occupied by actual information

Parameters
streamCUDA stream in which this operation is executed in
Returns
bytes

Definition at line 661 of file bucket_list_hash_table.cuh.

◆ bytes_total()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
__host__ index_type warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::bytes_total ( ) const
inlinenoexcept

get the the total number of bytes occupied by this data structure

Returns
bytes

Definition at line 631 of file bucket_list_hash_table.cuh.

◆ bytes_values()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
__host__ index_type warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::bytes_values ( const cudaStream_t  stream = 0) const
inlinenoexcept

get the the number of bytes in this data structure occupied by values

Parameters
streamCUDA stream in which this operation is executed in
Returns
bytes

Definition at line 651 of file bucket_list_hash_table.cuh.

◆ cg_size()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
static constexpr __host____device__ index_type warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::cg_size ( )
inlinestaticconstexprnoexcept

get cooperative group size

Returns
cooperative group size

Definition at line 81 of file bucket_list_hash_table.cuh.

◆ empty_key()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
static constexpr __host____device__ key_type warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::empty_key ( )
inlinestaticconstexprnoexcept

get empty key

Returns
empty key

Definition at line 54 of file bucket_list_hash_table.cuh.

◆ for_each()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
template<class Func >
__device__ status_type warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::for_each ( Func  f,
const key_type  key_in,
const cg::thread_block_tile< cg_size()> &  group,
const index_type  probing_length = defaults::probing_length() 
) const
inlinenoexcept

applies a funtion over all values of a corresponding key

Template Parameters
Functype of map i.e. CUDA device lambda
Parameters
[in]fmap to apply
[in]key_inkey to retrieve
[in]streamCUDA stream in which this operation is executed in

Definition at line 505 of file bucket_list_hash_table.cuh.

◆ init() [1/2]

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
__host__ void warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::init ( const cudaStream_t  stream = 0)
inlinenoexcept

(re)initialize the hash table

Parameters
streamCUDA stream in which this operation is executed

Definition at line 172 of file bucket_list_hash_table.cuh.

◆ init() [2/2]

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
__host__ void warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::init ( const key_type  seed,
const cudaStream_t  stream = 0 
)
inlinenoexcept

(re)initialize the hash table

Parameters
seedrandom seed
streamCUDA stream in which this operation is executed

Definition at line 153 of file bucket_list_hash_table.cuh.

◆ insert() [1/2]

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
template<class StatusHandler = defaults::status_handler_t>
__host__ void warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::insert ( const key_type *const  keys_in,
const value_type *const  values_in,
const index_type  num_in,
const cudaStream_t  stream = 0,
const index_type  probing_length = defaults::probing_length(),
typename StatusHandler::base_type *const  status_out = nullptr 
)
inlinenoexcept

insert a set of keys into the hash table

Template Parameters
StatusHandlerhandles returned status per key (see status_handlers)
Parameters
[in]keys_inpointer to keys to insert into the hash table
[in]values_incorresponds values to keys_in
[in]num_innumber of keys to insert
[in]streamCUDA stream in which this operation is executed in
[in]probing_lengthmaximum number of probing attempts
[out]status_outstatus information per key

Definition at line 236 of file bucket_list_hash_table.cuh.

◆ insert() [2/2]

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
__device__ status_type warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::insert ( const key_type  key_in,
const value_type value_in,
const cg::thread_block_tile< cg_size()> &  group,
const index_type  probing_length = defaults::probing_length() 
)
inlinenoexcept

inserts a key/value pair into the hash table

Parameters
[in]key_inkey to insert into the hash table
[in]value_invalue that corresponds to key_in
[in]groupcooperative group
[in]probing_lengthmaximum number of probing attempts
Returns
status (per thread)

Definition at line 185 of file bucket_list_hash_table.cuh.

◆ is_copy()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
__host____device__ bool warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::is_copy ( ) const
inlinenoexcept

indicates if this object is a shallow copy

Returns
bool

Definition at line 844 of file bucket_list_hash_table.cuh.

◆ is_initialized()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
__host____device__ bool warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::is_initialized ( ) const
inlinenoexcept

indicates if the hash table is properly initialized

Returns
true iff the hash table is properly initialized

Definition at line 695 of file bucket_list_hash_table.cuh.

◆ is_valid_key()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
static constexpr __host____device__ bool warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::is_valid_key ( const key_type  key)
inlinestaticconstexprnoexcept

checks if key is equal to (EmptyKey||TombstoneKey)

Returns
bool

Definition at line 72 of file bucket_list_hash_table.cuh.

◆ key_capacity()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
__host__ index_type warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::key_capacity ( ) const
inlinenoexcept

get the key capacity of the hash table

Returns
number of key slots in the hash table

Definition at line 724 of file bucket_list_hash_table.cuh.

◆ key_load_factor()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
__host__ float warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::key_load_factor ( const cudaStream_t  stream = 0) const
inlinenoexcept

get load factor of the key store

Parameters
streamCUDA stream in which this operation is executed in
Returns
load factor

Definition at line 612 of file bucket_list_hash_table.cuh.

◆ max_bucket_size()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
static constexpr __host____device__ index_type warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::max_bucket_size ( )
inlinestaticconstexprnoexcept

maximum bucket size

Returns
size

Definition at line 90 of file bucket_list_hash_table.cuh.

◆ num_keys()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
__host__ index_type warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::num_keys ( const cudaStream_t  stream = 0) const
inlinenoexcept

number of keys stored inside the hash table

Parameters
[in]streamCUDA stream in which this operation is executed in
Returns
number of keys inside the hash table

Definition at line 743 of file bucket_list_hash_table.cuh.

◆ num_values() [1/3]

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
__host__ index_type warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::num_values ( const cudaStream_t  stream = 0) const
inlinenoexcept

get number of values inside the hash table

Parameters
[in]streamCUDA stream in which this operation is executed in
Returns
total number of values

Definition at line 818 of file bucket_list_hash_table.cuh.

◆ num_values() [2/3]

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
template<class StatusHandler = defaults::status_handler_t>
__host__ void warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::num_values ( const key_type *const  keys_in,
const index_type  num_in,
index_type num_out,
index_type *const  num_per_key_out = nullptr,
const cudaStream_t  stream = 0,
const index_type  probing_length = defaults::probing_length(),
typename StatusHandler::base_type *const  status_out = nullptr 
) const
inlinenoexcept

get number of values to a corresponding set of keys inside the hash table

Parameters
[in]keys_inkeys to probe
[in]num_ininput size
[out]num_outtotal number of values in this query
[out]num_per_key_outnumber of values per key
[in]probing_lengthmaximum number of probing attempts
[in]streamCUDA stream in which this operation is executed in
[out]status_outstatus information (per key)

Definition at line 783 of file bucket_list_hash_table.cuh.

◆ num_values() [3/3]

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
__device__ status_type warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::num_values ( const key_type  key_in,
index_type num_out,
const cg::thread_block_tile< cg_size()> &  group,
const index_type  probing_length = defaults::probing_length() 
) const
inlinenoexcept

get number of values to a corresponding key inside the hash table

Parameters
[in]key_inkey to probe
[out]num_outnumber of values
[in]groupcooperative group this operation is executed in
[in]probing_lengthmaximum number of probing attempts
Returns
status (per thread)

Definition at line 756 of file bucket_list_hash_table.cuh.

◆ peek_status()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
__host__ status_type warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::peek_status ( const cudaStream_t  stream = 0) const
inlinenoexcept

get the status of the hash table

Parameters
streamCUDA stream in which this operation is executed in
Returns
the status

Definition at line 705 of file bucket_list_hash_table.cuh.

◆ pop_status()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
__host__ status_type warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::pop_status ( const cudaStream_t  stream = 0)
inlinenoexcept

get and reset the status of the hash table

Parameters
[in]streamCUDA stream in which this operation is executed in
Returns
the status

Definition at line 715 of file bucket_list_hash_table.cuh.

◆ relative_storage_density()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
__host__ float warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::relative_storage_density ( const cudaStream_t  stream = 0) const
inlinenoexcept

current relative storage density of the hash table

Parameters
streamCUDA stream in which this operation is executed in
Returns
storage density

Definition at line 681 of file bucket_list_hash_table.cuh.

◆ retrieve() [1/2]

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
template<class StatusHandler = defaults::status_handler_t>
__host__ void warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::retrieve ( const key_type *const  keys_in,
const index_type  num_in,
index_type *const  begin_offsets_out,
index_type *const  end_offsets_out,
value_type *const  values_out,
index_type num_out,
const cudaStream_t  stream = 0,
const index_type  probing_length = defaults::probing_length(),
typename StatusHandler::base_type *const  status_out = nullptr 
) const
inlinenoexcept

retrieve a set of keys from the hash table

Note
this method has a dry-run mode where it only calculates the needed array sizes in case no memory (aka nullptr ) is provided
end_offsets_out can be begin_offsets_out+1
Template Parameters
StatusHandlerhandles returned status per key (see status_handlers)
Parameters
[in]keys_inpointer to keys to retrieve from the hash table
[in]num_innumber of keys to retrieve
[out]begin_offsets_out
[out]end_offsets_out
[out]values_outretrieved values of keys in key_in
[out]num_outtotal number of values retrieved by this operation
[in]streamCUDA stream in which this operation is executed in
[in]probing_lengthmaximum number of probing attempts
[out]status_outstatus information (per key)

Definition at line 400 of file bucket_list_hash_table.cuh.

◆ retrieve() [2/2]

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
__device__ status_type warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::retrieve ( const key_type  key_in,
value_type *const  values_out,
index_type num_out,
const cg::thread_block_tile< cg_size()> &  group,
const index_type  probing_length = defaults::probing_length() 
) const
inlinenoexcept

retrieves a key from the hash table

Parameters
[in]key_inkey to retrieve from the hash table
[out]values_outpointer to storage fo the retrieved values
[out]num_outnumber of values retrieved
[in]groupcooperative group
[in]probing_lengthmaximum number of probing attempts
Returns
status (per thread)

Definition at line 350 of file bucket_list_hash_table.cuh.

◆ retrieve_all()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
__host__ void warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::retrieve_all ( key_type *const  keys_out,
index_type num_keys_out,
index_type *const  begin_offsets_out,
index_type *const  end_offsets_out,
value_type *const  values_out,
value_type num_values_out,
const cudaStream_t  stream = 0 
) const
inlinenoexcept

retrieves all elements from the hash table \info this method has a dry-run mode where it only calculates the needed array sizes in case no memory (aka nullptr ) is provided \info this method implements a multi-stage dry-run mode

Parameters
[out]keys_outpointer to the set of unique keys
[out]num_keys_outnumber of unique keys
[out]begin_offsets_outbegin of value range for a corresponding key in values_out
[out]end_offsets_outend of value range for a corresponding key in values_out
[out]values_outarray which holds all retrieved values
[out]num_values_outtotal number of values retrieved by this operation
[in]streamCUDA stream in which this operation is executed in

Definition at line 539 of file bucket_list_hash_table.cuh.

◆ retrieve_all_keys()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
__host__ void warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::retrieve_all_keys ( key_type *const  keys_out,
index_type num_out,
const cudaStream_t  stream = 0 
) const
inlinenoexcept

retrieves the set of all keys stored inside the hash table

Parameters
[out]keys_outpointer to the retrieved keys
[out]num_outnumber of retrieved keys
[in]streamCUDA stream in which this operation is executed in
Note
if keys_out==nullptr then only num_out will be computed

Definition at line 575 of file bucket_list_hash_table.cuh.

◆ storage_density()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
__host__ float warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::storage_density ( const cudaStream_t  stream = 0) const
inlinenoexcept

current storage density of the hash table

Parameters
streamCUDA stream in which this operation is executed in
Returns
storage density

Definition at line 671 of file bucket_list_hash_table.cuh.

◆ tombstone_key()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
static constexpr __host____device__ key_type warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::tombstone_key ( )
inlinestaticconstexprnoexcept

get tombstone key

Returns
tombstone key

Definition at line 63 of file bucket_list_hash_table.cuh.

◆ value_capacity()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
__host__ index_type warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::value_capacity ( ) const
inlinenoexcept

get the maximum value capacity of the hash table

Returns
maximum value capacity

Definition at line 733 of file bucket_list_hash_table.cuh.

◆ value_load_factor()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
__host__ float warpcore::BucketListHashTable< Key, Value, EmptyKey, TombstoneKey, ValueStore, ProbingScheme >::value_load_factor ( const cudaStream_t  stream = 0) const
inlinenoexcept

get load factor of the value store

Parameters
streamCUDA stream in which this operation is executed in
Returns
load factor

Definition at line 622 of file bucket_list_hash_table.cuh.

Friends And Related Function Documentation

◆ kernels::retrieve

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ValueStore = defaults::value_storage_t<Value>, class ProbingScheme = defaults::probing_scheme_t<Key, 8>>
template<class Core , class StatusHandler >
GLOBALQUALIFIER friend void kernels::retrieve ( const typename Core::key_type * const  ,
const  index_type,
const index_type * const  ,
const index_type * const  ,
typename Core::value_type * const  ,
const  Core,
const  index_type,
typename StatusHandler::base_type * const   
)
friend

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