diff --git a/parallel_hashmap/phmap.h b/parallel_hashmap/phmap.h index e56bed1..ac15f4e 100644 --- a/parallel_hashmap/phmap.h +++ b/parallel_hashmap/phmap.h @@ -418,6 +418,10 @@ struct GroupSse2Impl #endif } +#ifdef __INTEL_COMPILER +#pragma warning push +#pragma warning disable 68 +#endif // Returns a bitmask representing the positions of empty or deleted slots. // ----------------------------------------------------------------------- BitMask MatchEmptyOrDeleted() const { @@ -433,6 +437,9 @@ struct GroupSse2Impl return TrailingZeros( static_cast(_mm_movemask_epi8(_mm_cmpgt_epi8_fixed(special, ctrl)) + 1)); } +#ifdef __INTEL_COMPILER +#pragma warning pop +#endif // ---------------------------------------------------------------------- void ConvertSpecialToEmptyAndFullToDeleted(ctrl_t* dst) const { @@ -4387,21 +4394,6 @@ namespace hashtable_debug_internal { // -------------------------------------------------------------------------- // -------------------------------------------------------------------------- - -template -struct HashtableDebugAccess> { - 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::GetNumProbes(inner_set, key); - } -}; - template struct HashtableDebugAccess> { @@ -4461,6 +4453,23 @@ struct HashtableDebugAccess> } }; + +#if !defined(__clang__) // compilation error with clang++-12 -stdc++=20 (should fix ) +template +struct HashtableDebugAccess> { + 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::GetNumProbes(inner_set, key); + } +}; +#endif + } // namespace hashtable_debug_internal } // namespace priv