|
__host__ | HashSet (index_type min_capacity, key_type seed=defaults::seed< key_type >()) noexcept |
| constructor More...
|
|
__host____device__ | HashSet (const HashSet &o) noexcept |
| copy-constructor (shallow) More...
|
|
__host__ | HashSet (HashSet &&o) noexcept |
| move-constructor More...
|
|
__host__ | ~HashSet () noexcept |
| destructor More...
|
|
__host__ void | init (const key_type seed, const cudaStream_t stream=0) noexcept |
| (re)initialize the hash set More...
|
|
__host__ void | init (const cudaStream_t stream=0) noexcept |
| (re)initialize the hash set More...
|
|
__device__ Status | insert (key_type key_in, const cg::thread_block_tile< cg_size()> &group, index_type probing_length=defaults::probing_length()) noexcept |
| inserts a key into the hash set More...
|
|
template<class StatusHandler = defaults::status_handler_t> |
__host__ void | insert (const key_type *keys_in, index_type num_in, cudaStream_t stream=0, index_type probing_length=defaults::probing_length(), typename StatusHandler::base_type *status_out=nullptr) noexcept |
| insert a set of keys into the hash set More...
|
|
__device__ Status | retrieve (Key key_in, bool &flag_out, const cg::thread_block_tile< cg_size()> &group, index_type probing_length=defaults::probing_length()) const noexcept |
| retrieves a key from the hash set More...
|
|
template<class StatusHandler = defaults::status_handler_t> |
__host__ void | retrieve (const key_type *keys_in, index_type num_in, bool *flags_out, cudaStream_t stream=0, index_type probing_length=defaults::probing_length(), typename StatusHandler::base_type *status_out=nullptr) const noexcept |
| retrieve a set of keys from the hash table More...
|
|
__host__ void | retrieve_all (key_type *keys_out, index_type &num_out, cudaStream_t stream=0) const noexcept |
| retrieves all elements from the hash set More...
|
|
__device__ Status | erase (key_type key_in, const cg::thread_block_tile< cg_size()> &group, 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 (key_type *keys_in, index_type num_in, cudaStream_t stream=0, index_type probing_length=defaults::probing_length(), typename StatusHandler::base_type *status_out=nullptr) noexcept |
| erases a set of keys from the hash table More...
|
|
template<class Func > |
__host__ void | for_each (Func f, cudaStream_t stream=0, index_type smem_bytes=0) const noexcept |
| applies a funtion on all keys inside the table More...
|
|
__host__ index_type | size (cudaStream_t stream=0) const noexcept |
| number of key/value pairs stored inside the hash set More...
|
|
__host__ float | load_factor (cudaStream_t stream=0) const noexcept |
| current load factor of the hash set More...
|
|
__host__ float | storage_density (cudaStream_t stream=0) const noexcept |
| current storage density of the hash set 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__ Status | peek_status (cudaStream_t stream=0) const noexcept |
| get the status of the hash table More...
|
|
__host__ Status | pop_status (cudaStream_t stream=0) noexcept |
| get and reset the status of the hash table More...
|
|
__host____device__ bool | is_copy () const noexcept |
| indicates if this object is a shallow copy More...
|
|
template<class Key, Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 16>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
class warpcore::HashSet< Key, EmptyKey, TombstoneKey, ProbingScheme, TempMemoryBytes >
hash set
- Template Parameters
-
Key | key type (std::uint32_t or std::uint64_t ) |
EmptyKey | key which represents an empty slot |
TombstoneKey | key which represents an erased slot |
ProbingScheme | probing scheme from warpcore::probing_schemes |
TempMemoryBytes | size of temporary storage (typically a few kB) |
Definition at line 22 of file hash_set.cuh.
template<class Key , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 16>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
__host____device__ warpcore::HashSet< Key, EmptyKey, TombstoneKey, ProbingScheme, TempMemoryBytes >::HashSet |
( |
const HashSet< Key, EmptyKey, TombstoneKey, ProbingScheme, TempMemoryBytes > & |
o | ) |
|
|
inlinenoexcept |
copy-constructor (shallow)
- Parameters
-
Definition at line 116 of file hash_set.cuh.
template<class Key , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 16>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
get the total number of bytes occupied by this data structure
- Returns
- bytes
Definition at line 592 of file hash_set.cuh.
template<class Key , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 16>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
get the capacity of the hash table
- Returns
- number of slots in the hash table
Definition at line 583 of file hash_set.cuh.
template<class Key , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 16>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
static constexpr __host____device__ index_type warpcore::HashSet< Key, EmptyKey, TombstoneKey, ProbingScheme, TempMemoryBytes >::cg_size |
( |
| ) |
|
|
inlinestaticconstexprnoexcept |
get cooperative group size
- Returns
- cooperative group size
Definition at line 71 of file hash_set.cuh.
template<class Key , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 16>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
template<class StatusHandler = defaults::status_handler_t>
erases a set of keys from the hash table
- Template Parameters
-
- Parameters
-
[in] | keys_in | pointer to keys to erase from the hash table |
[in] | num_in | number of keys to erase |
[in] | stream | CUDA stream in which this operation is executed in |
[in] | probing_length | maximum number of probing attempts |
[out] | status_out | status information (per key) |
Definition at line 450 of file hash_set.cuh.
template<class Key , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 16>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
template<class Func >
__host__ void warpcore::HashSet< Key, EmptyKey, TombstoneKey, ProbingScheme, TempMemoryBytes >::for_each |
( |
Func |
f, |
|
|
cudaStream_t |
stream = 0 , |
|
|
index_type |
smem_bytes = 0 |
|
) |
| const |
|
inlinenoexcept |
applies a funtion on all keys inside the table
- Template Parameters
-
Func | type of map i.e. CUDA device lambda |
- Parameters
-
[in] | f | map to apply |
[in] | stream | CUDA stream in which this operation is executed in |
[in] | size | of shared memory to reserve for this execution |
Definition at line 472 of file hash_set.cuh.
template<class Key , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 16>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
__host__ void warpcore::HashSet< Key, EmptyKey, TombstoneKey, ProbingScheme, TempMemoryBytes >::init |
( |
const cudaStream_t |
stream = 0 | ) |
|
|
inlinenoexcept |
(re)initialize the hash set
- Parameters
-
[in] | stream | CUDA stream in which this operation is executed in |
Definition at line 181 of file hash_set.cuh.
template<class Key , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 16>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
__host__ void warpcore::HashSet< Key, EmptyKey, TombstoneKey, ProbingScheme, TempMemoryBytes >::init |
( |
const key_type |
seed, |
|
|
const cudaStream_t |
stream = 0 |
|
) |
| |
|
inlinenoexcept |
(re)initialize the hash set
- Parameters
-
[in] | seed | random seed |
[in] | stream | CUDA stream in which this operation is executed in |
Definition at line 161 of file hash_set.cuh.
template<class Key , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 16>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
template<class StatusHandler = defaults::status_handler_t>
insert a set of keys into the hash set
- Template Parameters
-
- Parameters
-
[in] | keys_in | pointer to keys to insert into the hash set |
[in] | num_in | number of keys to insert |
[in] | stream | CUDA stream in which this operation is executed in |
[in] | probing_length | maximum number of probing attempts |
[out] | status_out | status information per key |
Definition at line 266 of file hash_set.cuh.
template<class Key , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 16>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
__host____device__ bool warpcore::HashSet< Key, EmptyKey, TombstoneKey, ProbingScheme, TempMemoryBytes >::is_copy |
( |
| ) |
const |
|
inlinenoexcept |
indicates if this object is a shallow copy
- Returns
bool
Definition at line 678 of file hash_set.cuh.
template<class Key , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 16>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
static constexpr __host____device__ bool warpcore::HashSet< Key, EmptyKey, TombstoneKey, ProbingScheme, TempMemoryBytes >::is_empty_key |
( |
key_type |
key | ) |
|
|
inlinestaticconstexprnoexcept |
checks if key
is equal to EmptyKey
- Returns
bool
Definition at line 651 of file hash_set.cuh.
template<class Key , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 16>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
static constexpr __host____device__ bool warpcore::HashSet< Key, EmptyKey, TombstoneKey, ProbingScheme, TempMemoryBytes >::is_tombstone_key |
( |
key_type |
key | ) |
|
|
inlinestaticconstexprnoexcept |
checks if key
is equal to TombstoneKey
- Returns
bool
Definition at line 660 of file hash_set.cuh.
template<class Key , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 16>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
static constexpr __host____device__ bool warpcore::HashSet< Key, EmptyKey, TombstoneKey, ProbingScheme, TempMemoryBytes >::is_valid_key |
( |
key_type |
key | ) |
|
|
inlinestaticconstexprnoexcept |
checks if key
is equal to
(EmptyKey||TombstoneKey)
- Returns
bool
Definition at line 669 of file hash_set.cuh.
template<class Key , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 16>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
__host__ float warpcore::HashSet< Key, EmptyKey, TombstoneKey, ProbingScheme, TempMemoryBytes >::load_factor |
( |
cudaStream_t |
stream = 0 | ) |
const |
|
inlinenoexcept |
current load factor of the hash set
- Parameters
-
stream | CUDA stream in which this operation is executed in |
- Returns
- load factor
Definition at line 564 of file hash_set.cuh.
template<class Key , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 16>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
__host__ Status warpcore::HashSet< Key, EmptyKey, TombstoneKey, ProbingScheme, TempMemoryBytes >::peek_status |
( |
cudaStream_t |
stream = 0 | ) |
const |
|
inlinenoexcept |
get the status of the hash table
- Parameters
-
stream | CUDA stream in which this operation is executed in |
- Returns
- the status
Definition at line 602 of file hash_set.cuh.
template<class Key , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 16>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
__host__ Status warpcore::HashSet< Key, EmptyKey, TombstoneKey, ProbingScheme, TempMemoryBytes >::pop_status |
( |
cudaStream_t |
stream = 0 | ) |
|
|
inlinenoexcept |
get and reset the status of the hash table
- Parameters
-
stream | CUDA stream in which this operation is executed in |
- Returns
- the status
Definition at line 626 of file hash_set.cuh.
template<class Key , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 16>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
template<class StatusHandler = defaults::status_handler_t>
retrieve a set of keys from the hash table
- Template Parameters
-
- Parameters
-
[in] | keys_in | pointer to keys to retrieve from the hash table |
[in] | num_in | number of keys to retrieve |
[out] | flags_out | flags membership of keys_in in the set |
[in] | stream | CUDA stream in which this operation is executed in |
[in] | probing_length | maximum number of probing attempts |
[out] | status_out | status information (per key) |
Definition at line 342 of file hash_set.cuh.
template<class Key , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 16>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
__host__ void warpcore::HashSet< Key, EmptyKey, TombstoneKey, ProbingScheme, TempMemoryBytes >::retrieve_all |
( |
key_type * |
keys_out, |
|
|
index_type & |
num_out, |
|
|
cudaStream_t |
stream = 0 |
|
) |
| const |
|
inlinenoexcept |
retrieves all elements from the hash set
- Parameters
-
[out] | keys_out | location to store all retrieved keys |
[out] | num_out | number of of keys retrieved |
[in] | stream | CUDA stream in which this operation is executed in |
Definition at line 367 of file hash_set.cuh.
template<class Key , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 16>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
__host__ index_type warpcore::HashSet< Key, EmptyKey, TombstoneKey, ProbingScheme, TempMemoryBytes >::size |
( |
cudaStream_t |
stream = 0 | ) |
const |
|
inlinenoexcept |
number of key/value pairs stored inside the hash set
- Returns
- the number of key/value pairs inside the hash table
Definition at line 500 of file hash_set.cuh.
template<class Key , Key EmptyKey = defaults::empty_key<Key>(), Key TombstoneKey = defaults::tombstone_key<Key>(), class ProbingScheme = defaults::probing_scheme_t<Key, 16>, index_t TempMemoryBytes = defaults::temp_memory_bytes()>
__host__ float warpcore::HashSet< Key, EmptyKey, TombstoneKey, ProbingScheme, TempMemoryBytes >::storage_density |
( |
cudaStream_t |
stream = 0 | ) |
const |
|
inlinenoexcept |
current storage density of the hash set
- Parameters
-
stream | CUDA stream in which this operation is executed in |
- Returns
- storage density
Definition at line 574 of file hash_set.cuh.