gpurhh
GPU Robin Hood Hashing — header-only CUDA library
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
gpurhh::HashTable< Key, Value, Hash, EmptyKey, Reduction, CacheLineBytes, WarpSize, MaxProbeBuckets > Class Template Reference

Classes

struct  Bucket
 
struct  Slot
 
class  View
 

Public Types

using key_type = Key
 
using value_type = Value
 
using hasher = Hash
 

Public Member Functions

 HashTable (std::size_t min_capacity)
 
 ~HashTable ()
 
 HashTable (const HashTable &)=delete
 
HashTableoperator= (const HashTable &)=delete
 
 HashTable (HashTable &&) noexcept
 
HashTableoperator= (HashTable &&) noexcept
 
View view () const noexcept
 
std::size_t capacity () const noexcept
 
void clear (cudaStream_t stream=default_stream)
 
Bucketdata () noexcept
 
const Bucketdata () const noexcept
 

Static Public Attributes

static constexpr Key empty_key = EmptyKey
 
static constexpr int slot_bytes = sizeof(Slot)
 
static constexpr int cache_line_bytes = CacheLineBytes
 
static constexpr int warp_size = WarpSize
 
static constexpr int bucket_size = CacheLineBytes / slot_bytes
 
static constexpr int tile_size = bucket_size
 
static constexpr int tiles_per_warp = WarpSize / bucket_size
 
static constexpr int max_probe_buckets = MaxProbeBuckets
 
static constexpr unsigned char empty_key_byte
 

Member Typedef Documentation

◆ hasher

template<class Key , class Value , class Hash = default_hash<Key>, Key EmptyKey = default_empty_key<Key>::key, class Reduction = replace_op, int CacheLineBytes = 128, int WarpSize = 32, int MaxProbeBuckets = 8>
using gpurhh::HashTable< Key, Value, Hash, EmptyKey, Reduction, CacheLineBytes, WarpSize, MaxProbeBuckets >::hasher = Hash

◆ key_type

template<class Key , class Value , class Hash = default_hash<Key>, Key EmptyKey = default_empty_key<Key>::key, class Reduction = replace_op, int CacheLineBytes = 128, int WarpSize = 32, int MaxProbeBuckets = 8>
using gpurhh::HashTable< Key, Value, Hash, EmptyKey, Reduction, CacheLineBytes, WarpSize, MaxProbeBuckets >::key_type = Key

◆ value_type

template<class Key , class Value , class Hash = default_hash<Key>, Key EmptyKey = default_empty_key<Key>::key, class Reduction = replace_op, int CacheLineBytes = 128, int WarpSize = 32, int MaxProbeBuckets = 8>
using gpurhh::HashTable< Key, Value, Hash, EmptyKey, Reduction, CacheLineBytes, WarpSize, MaxProbeBuckets >::value_type = Value

Constructor & Destructor Documentation

◆ HashTable() [1/3]

template<class K , class V , class H , K E, class R , int CL, int WS, int MPB>
gpurhh::HashTable< K, V, H, E, R, CL, WS, MPB >::HashTable ( std::size_t  min_capacity)
explicit

◆ ~HashTable()

template<class K , class V , class H , K E, class R , int CL, int WS, int MPB>
gpurhh::HashTable< K, V, H, E, R, CL, WS, MPB >::~HashTable ( )

◆ HashTable() [2/3]

template<class Key , class Value , class Hash = default_hash<Key>, Key EmptyKey = default_empty_key<Key>::key, class Reduction = replace_op, int CacheLineBytes = 128, int WarpSize = 32, int MaxProbeBuckets = 8>
gpurhh::HashTable< Key, Value, Hash, EmptyKey, Reduction, CacheLineBytes, WarpSize, MaxProbeBuckets >::HashTable ( const HashTable< Key, Value, Hash, EmptyKey, Reduction, CacheLineBytes, WarpSize, MaxProbeBuckets > &  )
delete

◆ HashTable() [3/3]

template<class K , class V , class H , K E, class R , int CL, int WS, int MPB>
gpurhh::HashTable< K, V, H, E, R, CL, WS, MPB >::HashTable ( HashTable< Key, Value, Hash, EmptyKey, Reduction, CacheLineBytes, WarpSize, MaxProbeBuckets > &&  other)
noexcept

Member Function Documentation

◆ capacity()

template<class Key , class Value , class Hash = default_hash<Key>, Key EmptyKey = default_empty_key<Key>::key, class Reduction = replace_op, int CacheLineBytes = 128, int WarpSize = 32, int MaxProbeBuckets = 8>
std::size_t gpurhh::HashTable< Key, Value, Hash, EmptyKey, Reduction, CacheLineBytes, WarpSize, MaxProbeBuckets >::capacity ( ) const
inlinenoexcept

◆ clear()

template<class K , class V , class H , K E, class R , int CL, int WS, int MPB>
void gpurhh::HashTable< K, V, H, E, R, CL, WS, MPB >::clear ( cudaStream_t  stream = default_stream)

◆ data() [1/2]

template<class Key , class Value , class Hash = default_hash<Key>, Key EmptyKey = default_empty_key<Key>::key, class Reduction = replace_op, int CacheLineBytes = 128, int WarpSize = 32, int MaxProbeBuckets = 8>
const Bucket * gpurhh::HashTable< Key, Value, Hash, EmptyKey, Reduction, CacheLineBytes, WarpSize, MaxProbeBuckets >::data ( ) const
inlinenoexcept

◆ data() [2/2]

template<class Key , class Value , class Hash = default_hash<Key>, Key EmptyKey = default_empty_key<Key>::key, class Reduction = replace_op, int CacheLineBytes = 128, int WarpSize = 32, int MaxProbeBuckets = 8>
Bucket * gpurhh::HashTable< Key, Value, Hash, EmptyKey, Reduction, CacheLineBytes, WarpSize, MaxProbeBuckets >::data ( )
inlinenoexcept

◆ operator=() [1/2]

template<class Key , class Value , class Hash = default_hash<Key>, Key EmptyKey = default_empty_key<Key>::key, class Reduction = replace_op, int CacheLineBytes = 128, int WarpSize = 32, int MaxProbeBuckets = 8>
HashTable & gpurhh::HashTable< Key, Value, Hash, EmptyKey, Reduction, CacheLineBytes, WarpSize, MaxProbeBuckets >::operator= ( const HashTable< Key, Value, Hash, EmptyKey, Reduction, CacheLineBytes, WarpSize, MaxProbeBuckets > &  )
delete

◆ operator=() [2/2]

template<class K , class V , class H , K E, class R , int CL, int WS, int MPB>
HashTable< K, V, H, E, R, CL, WS, MPB > & gpurhh::HashTable< K, V, H, E, R, CL, WS, MPB >::operator= ( HashTable< Key, Value, Hash, EmptyKey, Reduction, CacheLineBytes, WarpSize, MaxProbeBuckets > &&  other)
noexcept

◆ view()

template<class K , class V , class H , K E, class R , int CL, int WS, int MPB>
HashTable< K, V, H, E, R, CL, WS, MPB >::View gpurhh::HashTable< K, V, H, E, R, CL, WS, MPB >::view ( ) const
noexcept

Member Data Documentation

◆ bucket_size

template<class Key , class Value , class Hash = default_hash<Key>, Key EmptyKey = default_empty_key<Key>::key, class Reduction = replace_op, int CacheLineBytes = 128, int WarpSize = 32, int MaxProbeBuckets = 8>
constexpr int gpurhh::HashTable< Key, Value, Hash, EmptyKey, Reduction, CacheLineBytes, WarpSize, MaxProbeBuckets >::bucket_size = CacheLineBytes / slot_bytes
staticconstexpr

◆ cache_line_bytes

template<class Key , class Value , class Hash = default_hash<Key>, Key EmptyKey = default_empty_key<Key>::key, class Reduction = replace_op, int CacheLineBytes = 128, int WarpSize = 32, int MaxProbeBuckets = 8>
constexpr int gpurhh::HashTable< Key, Value, Hash, EmptyKey, Reduction, CacheLineBytes, WarpSize, MaxProbeBuckets >::cache_line_bytes = CacheLineBytes
staticconstexpr

◆ empty_key

template<class Key , class Value , class Hash = default_hash<Key>, Key EmptyKey = default_empty_key<Key>::key, class Reduction = replace_op, int CacheLineBytes = 128, int WarpSize = 32, int MaxProbeBuckets = 8>
constexpr Key gpurhh::HashTable< Key, Value, Hash, EmptyKey, Reduction, CacheLineBytes, WarpSize, MaxProbeBuckets >::empty_key = EmptyKey
staticconstexpr

◆ empty_key_byte

template<class Key , class Value , class Hash = default_hash<Key>, Key EmptyKey = default_empty_key<Key>::key, class Reduction = replace_op, int CacheLineBytes = 128, int WarpSize = 32, int MaxProbeBuckets = 8>
constexpr unsigned char gpurhh::HashTable< Key, Value, Hash, EmptyKey, Reduction, CacheLineBytes, WarpSize, MaxProbeBuckets >::empty_key_byte
staticconstexpr
Initial value:
=
std::bit_cast<std::array<unsigned char, sizeof(Key)>>(empty_key)[0]
static constexpr Key empty_key
Definition hash_table.cuh:199

◆ max_probe_buckets

template<class Key , class Value , class Hash = default_hash<Key>, Key EmptyKey = default_empty_key<Key>::key, class Reduction = replace_op, int CacheLineBytes = 128, int WarpSize = 32, int MaxProbeBuckets = 8>
constexpr int gpurhh::HashTable< Key, Value, Hash, EmptyKey, Reduction, CacheLineBytes, WarpSize, MaxProbeBuckets >::max_probe_buckets = MaxProbeBuckets
staticconstexpr

◆ slot_bytes

template<class Key , class Value , class Hash = default_hash<Key>, Key EmptyKey = default_empty_key<Key>::key, class Reduction = replace_op, int CacheLineBytes = 128, int WarpSize = 32, int MaxProbeBuckets = 8>
constexpr int gpurhh::HashTable< Key, Value, Hash, EmptyKey, Reduction, CacheLineBytes, WarpSize, MaxProbeBuckets >::slot_bytes = sizeof(Slot)
staticconstexpr

◆ tile_size

template<class Key , class Value , class Hash = default_hash<Key>, Key EmptyKey = default_empty_key<Key>::key, class Reduction = replace_op, int CacheLineBytes = 128, int WarpSize = 32, int MaxProbeBuckets = 8>
constexpr int gpurhh::HashTable< Key, Value, Hash, EmptyKey, Reduction, CacheLineBytes, WarpSize, MaxProbeBuckets >::tile_size = bucket_size
staticconstexpr

◆ tiles_per_warp

template<class Key , class Value , class Hash = default_hash<Key>, Key EmptyKey = default_empty_key<Key>::key, class Reduction = replace_op, int CacheLineBytes = 128, int WarpSize = 32, int MaxProbeBuckets = 8>
constexpr int gpurhh::HashTable< Key, Value, Hash, EmptyKey, Reduction, CacheLineBytes, WarpSize, MaxProbeBuckets >::tiles_per_warp = WarpSize / bucket_size
staticconstexpr

◆ warp_size

template<class Key , class Value , class Hash = default_hash<Key>, Key EmptyKey = default_empty_key<Key>::key, class Reduction = replace_op, int CacheLineBytes = 128, int WarpSize = 32, int MaxProbeBuckets = 8>
constexpr int gpurhh::HashTable< Key, Value, Hash, EmptyKey, Reduction, CacheLineBytes, WarpSize, MaxProbeBuckets >::warp_size = WarpSize
staticconstexpr

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