Merge pull request #149 from stdpain/master

Implement HashtableDebugAccess for parallel_hash_set
This commit is contained in:
Gregory Popovitch
2022-06-21 00:35:40 +02:00
committed by GitHub
+15
View File
@@ -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>>
{