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

single-value hash table More...

Public Types

using key_type = Key
 
using value_type = Value
 
using index_type = index_t
 
using status_type = Status
 

Public Member Functions

__host__ SingleValueHashTable (const index_type min_capacity, const key_type seed=defaults::seed< key_type >(), const bool no_init=false) noexcept
 constructor More...
 
__host____device__ SingleValueHashTable (const SingleValueHashTable &o) noexcept
 copy-constructor (shallow) More...
 
__host__ SingleValueHashTable (SingleValueHashTable &&o) noexcept
 move-constructor More...
 
__host__ ~SingleValueHashTable () noexcept
 destructor 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 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 &value_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, value_type *const values_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 StatusHandler = defaults::status_handler_t>
__host__ void retrieve (const key_type *const keys_in, const index_type num_in, key_type *const keys_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...
 
__host__ void retrieve_all (key_type *const keys_out, value_type *const values_out, index_type &num_out, const cudaStream_t stream=0) const noexcept
 retrieves all elements from the hash table More...
 
__device__ status_type erase (const key_type key_in, const cg::thread_block_tile< cg_size()> &group, const index_type probing_length=defaults::probing_length()) noexcept
 erases a key from the hash table More...
 
template<class StatusHandler = defaults::status_handler_t>
__host__ void erase (const key_type *const keys_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
 erases a set of keys from the hash table More...
 
template<class Func >
__host__ void for_each (Func f, const cudaStream_t stream=0, const index_type smem_bytes=0) const noexcept
 applies a funtion over all key value pairs inside the table More...
 
__host__ index_type size (const cudaStream_t stream=0) const noexcept
 number of key/value pairs stored inside the hash table More...
 
__host__ float load_factor (const cudaStream_t stream=0) const noexcept
 current load factor of the hash table More...
 
__host__ float storage_density (const cudaStream_t stream=0) const noexcept
 current storage density of the hash table More...
 
__host____device__ index_type capacity () const noexcept
 get the capacity of the hash table More...
 
__host__ index_type bytes_total () const noexcept
 get the total number of bytes occupied by this data structure 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____device__ key_type seed () const noexcept
 get random seed 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__ index_type cg_size () noexcept
 get cooperative group size More...
 
static constexpr __host____device__ bool is_empty_key (const key_type key) noexcept
 checks if key is equal to EmptyKey More...
 
static constexpr __host____device__ bool is_tombstone_key (const key_type key) noexcept
 checks if key is equal to TombstoneKey More...
 
static constexpr __host____device__ bool is_valid_key (const key_type key) noexcept
 checks if key is equal to (EmptyKey||TombstoneKey) More...
 

Friends

template<class Key_ , class Value_ , Key_ EmptyKey_, Key_ TombstoneKey_, class ProbingScheme_ , class TableStorage_ , index_type TempMemoryBytes_>
class CountingHashTable
 
template<class Key_ , class Value_ , Key_ EmptyKey_, Key_ TombstoneKey_, class ValueStore_ , class ProbingScheme_ >
class BucketListHashTable
 

Detailed Description

template<class Key, class Value, Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
class warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >

single-value 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
ProbingSchemeprobing scheme from warpcore::probing_schemes
TableStoragememory layout from warpcore::storage::key_value
TempMemoryBytessize of temporary storage (typically a few kB)

Definition at line 37 of file single_value_hash_table.cuh.

Member Typedef Documentation

◆ index_type

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
using warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::index_type = index_t

Definition at line 76 of file single_value_hash_table.cuh.

◆ key_type

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
using warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::key_type = Key

Definition at line 74 of file single_value_hash_table.cuh.

◆ status_type

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
using warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::status_type = Status

Definition at line 77 of file single_value_hash_table.cuh.

◆ value_type

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
using warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::value_type = Value

Definition at line 75 of file single_value_hash_table.cuh.

Constructor & Destructor Documentation

◆ SingleValueHashTable() [1/3]

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
__host__ warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::SingleValueHashTable ( const index_type  min_capacity,
const key_type  seed = defaults::seed<key_type>(),
const bool  no_init = false 
)
inlineexplicitnoexcept

constructor

Parameters
[in]min_capacityminimum number of slots in the hash table
[in]seedrandom seed
[in]no_initwhether to initialize the table at construction or not

Definition at line 112 of file single_value_hash_table.cuh.

◆ SingleValueHashTable() [2/3]

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
__host____device__ warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::SingleValueHashTable ( const SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes > &  o)
inlinenoexcept

copy-constructor (shallow)

Parameters
[in]objectto be copied

Definition at line 134 of file single_value_hash_table.cuh.

◆ SingleValueHashTable() [3/3]

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
__host__ warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::SingleValueHashTable ( SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes > &&  o)
inlinenoexcept

move-constructor

Parameters
[in]objectto be moved

Definition at line 147 of file single_value_hash_table.cuh.

◆ ~SingleValueHashTable()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
__host__ warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::~SingleValueHashTable ( )
inlinenoexcept

destructor

Definition at line 162 of file single_value_hash_table.cuh.

Member Function Documentation

◆ bytes_total()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
__host__ index_type warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::bytes_total ( ) const
inlinenoexcept

get the total number of bytes occupied by this data structure

Returns
bytes

Definition at line 627 of file single_value_hash_table.cuh.

◆ capacity()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
__host____device__ index_type warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::capacity ( ) const
inlinenoexcept

get the capacity of the hash table

Returns
number of slots in the hash table

Definition at line 618 of file single_value_hash_table.cuh.

◆ cg_size()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
static constexpr __host____device__ index_type warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::cg_size ( )
inlinestaticconstexprnoexcept

get cooperative group size

Returns
cooperative group size

Definition at line 101 of file single_value_hash_table.cuh.

◆ empty_key()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
static constexpr __host____device__ key_type warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::empty_key ( )
inlinestaticconstexprnoexcept

get empty key

Returns
empty key

Definition at line 83 of file single_value_hash_table.cuh.

◆ erase() [1/2]

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
template<class StatusHandler = defaults::status_handler_t>
__host__ void warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::erase ( const key_type *const  keys_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

erases a set of keys from the hash table

Template Parameters
StatusHandlerhandles returned per key (see status_handlers )
Parameters
[in]keys_inpointer to keys to erase from the hash table
[in]num_innumber of keys to erase
[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 480 of file single_value_hash_table.cuh.

◆ erase() [2/2]

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
__device__ status_type warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::erase ( const key_type  key_in,
const cg::thread_block_tile< cg_size()> &  group,
const index_type  probing_length = defaults::probing_length() 
)
inlinenoexcept

erases a key from the hash table

Parameters
[in]key_inkey to erase from the hash table
[in]groupcooperative group
[in]probing_lengthmaximum number of probing attempts
Returns
status (per thread)

Definition at line 426 of file single_value_hash_table.cuh.

◆ for_each()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
template<class Func >
__host__ void warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::for_each ( Func  f,
const cudaStream_t  stream = 0,
const index_type  smem_bytes = 0 
) const
inlinenoexcept

applies a funtion over all key value pairs inside the table

Template Parameters
Functype of map i.e. CUDA device lambda
Parameters
[in]fmap to apply
[in]streamCUDA stream in which this operation is executed in
[in]sizeof shared memory to reserve for this execution

Definition at line 506 of file single_value_hash_table.cuh.

◆ init() [1/2]

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
__host__ void warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::init ( const cudaStream_t  stream = 0)
inlinenoexcept

(re)initialize the hash table

Parameters
[in]streamCUDA stream in which this operation is executed in

Definition at line 198 of file single_value_hash_table.cuh.

◆ init() [2/2]

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
__host__ void warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::init ( const key_type  seed,
const cudaStream_t  stream = 0 
)
inlinenoexcept

(re)initialize the hash table

Parameters
[in]seedrandom seed
[in]streamCUDA stream in which this operation is executed in

Definition at line 176 of file single_value_hash_table.cuh.

◆ insert() [1/2]

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
template<class StatusHandler = defaults::status_handler_t>
__host__ void warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::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 241 of file single_value_hash_table.cuh.

◆ insert() [2/2]

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
__device__ status_type warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::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 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 211 of file single_value_hash_table.cuh.

◆ is_copy()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
__host____device__ bool warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::is_copy ( ) const
inlinenoexcept

indicates if this object is a shallow copy

Returns
bool

Definition at line 729 of file single_value_hash_table.cuh.

◆ is_empty_key()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
static constexpr __host____device__ bool warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::is_empty_key ( const key_type  key)
inlinestaticconstexprnoexcept

checks if key is equal to EmptyKey

Returns
bool

Definition at line 693 of file single_value_hash_table.cuh.

◆ is_initialized()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
__host____device__ bool warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::is_initialized ( ) const
inlinenoexcept

indicates if the hash table is properly initialized

Returns
true iff the hash table is properly initialized

Definition at line 636 of file single_value_hash_table.cuh.

◆ is_tombstone_key()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
static constexpr __host____device__ bool warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::is_tombstone_key ( const key_type  key)
inlinestaticconstexprnoexcept

checks if key is equal to TombstoneKey

Returns
bool

Definition at line 702 of file single_value_hash_table.cuh.

◆ is_valid_key()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
static constexpr __host____device__ bool warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::is_valid_key ( const key_type  key)
inlinestaticconstexprnoexcept

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

Returns
bool

Definition at line 711 of file single_value_hash_table.cuh.

◆ load_factor()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
__host__ float warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::load_factor ( const cudaStream_t  stream = 0) const
inlinenoexcept

current load factor of the hash table

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

Definition at line 599 of file single_value_hash_table.cuh.

◆ peek_status()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
__host__ status_type warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::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 646 of file single_value_hash_table.cuh.

◆ pop_status()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
__host__ status_type warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::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 670 of file single_value_hash_table.cuh.

◆ retrieve() [1/3]

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
template<class StatusHandler = defaults::status_handler_t>
__host__ void warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::retrieve ( const key_type *const  keys_in,
const index_type  num_in,
key_type *const  keys_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

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]keys_outkeys retrieved from the hash table
[out]values_outretrieved values
[out]num_outnumber of pairs retrieved
[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 352 of file single_value_hash_table.cuh.

◆ retrieve() [2/3]

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
template<class StatusHandler = defaults::status_handler_t>
__host__ void warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::retrieve ( const key_type *const  keys_in,
const index_type  num_in,
value_type *const  values_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

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]values_outretrieved values of keys in key_in
[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 320 of file single_value_hash_table.cuh.

◆ retrieve() [3/3]

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
__device__ status_type warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::retrieve ( const key_type  key_in,
value_type value_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]value_outvalue for key_in
[in]groupcooperative group
[in]probing_lengthmaximum number of probing attempts
Returns
status (per thread)

Definition at line 268 of file single_value_hash_table.cuh.

◆ retrieve_all()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
__host__ void warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::retrieve_all ( key_type *const  keys_out,
value_type *const  values_out,
index_type num_out,
const cudaStream_t  stream = 0 
) const
inlinenoexcept

retrieves all elements from the hash table

Parameters
[out]keys_outlocation to store retrieved keys
[out]values_outlocation to store corresponding retrieved values
[out]num_outnumber of of key/value pairs retrieved
[in]streamCUDA stream in which this operation is executed in

Definition at line 391 of file single_value_hash_table.cuh.

◆ seed()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
__host____device__ key_type warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::seed ( ) const
inlinenoexcept

get random seed

Returns
seed

Definition at line 720 of file single_value_hash_table.cuh.

◆ size()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
__host__ index_type warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::size ( const cudaStream_t  stream = 0) const
inlinenoexcept

number of key/value pairs stored inside the hash table

Parameters
[in]streamCUDA stream in which this operation is executed in
Returns
the number of key/value pairs inside the hash table

Definition at line 535 of file single_value_hash_table.cuh.

◆ storage_density()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
__host__ float warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::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 609 of file single_value_hash_table.cuh.

◆ tombstone_key()

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
static constexpr __host____device__ key_type warpcore::SingleValueHashTable< Key, Value, EmptyKey, TombstoneKey, ProbingScheme, TableStorage, TempMemoryBytes >::tombstone_key ( )
inlinestaticconstexprnoexcept

get tombstone key

Returns
tombstone key

Definition at line 92 of file single_value_hash_table.cuh.

Friends And Related Function Documentation

◆ BucketListHashTable

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
template<class Key_ , class Value_ , Key_ EmptyKey_, Key_ TombstoneKey_, class ValueStore_ , class ProbingScheme_ >
friend class BucketListHashTable
friend

Definition at line 909 of file single_value_hash_table.cuh.

◆ CountingHashTable

template<class Key , class Value , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 8>, class TableStorage = defaults::table_storage_t<Key, Value>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
template<class Key_ , class Value_ , Key_ EmptyKey_, Key_ TombstoneKey_, class ProbingScheme_ , class TableStorage_ , index_type TempMemoryBytes_>
friend class CountingHashTable
friend

Definition at line 900 of file single_value_hash_table.cuh.


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