mirror of
https://github.com/greg7mdp/parallel-hashmap.git
synced 2026-08-29 08:34:39 +08:00
Merge pull request #149 from stdpain/master
Implement HashtableDebugAccess for parallel_hash_set
This commit is contained in:
Vendored
+15
@@ -4387,6 +4387,21 @@ namespace hashtable_debug_internal {
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
template <typename Set>
|
||||
struct HashtableDebugAccess<Set, phmap::void_t<typename Set::parallel_hash_set>> {
|
||||
using Traits = typename Set::PolicyTraits;
|
||||
using Slot = typename Traits::slot_type;
|
||||
using EmbeddedSet = typename Set::EmbeddedSet;
|
||||
|
||||
static size_t GetNumProbes(const Set& set, const typename Set::key_type& key) {
|
||||
size_t hashval = set.hash(key);
|
||||
auto& inner = set.sets_[set.subidx(hashval)];
|
||||
auto& inner_set = inner.set_;
|
||||
return HashtableDebugAccess<EmbeddedSet>::GetNumProbes(inner_set, key);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Set>
|
||||
struct HashtableDebugAccess<Set, phmap::void_t<typename Set::raw_hash_set>>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user