mirror of
https://github.com/greg7mdp/parallel-hashmap.git
synced 2026-08-29 08:34:39 +08:00
Add preprocessor macro PHMAP_DISABLE_MIX (#259)
* Add preporcessor define to disable mixing (`PHMAP_DISABLE_MIX`). * Update `README.md`.
This commit is contained in:
committed by
GitHub
parent
debe606647
commit
a6ce0835ca
Vendored
+8
@@ -1892,7 +1892,11 @@ private:
|
||||
{
|
||||
template <class K, class... Args>
|
||||
size_t operator()(const K& key, Args&&...) const {
|
||||
#if PHMAP_DISABLE_MIX
|
||||
return h(key);
|
||||
#else
|
||||
return phmap_mix<sizeof(size_t)>()(h(key));
|
||||
#endif
|
||||
}
|
||||
const hasher& h;
|
||||
};
|
||||
@@ -3749,7 +3753,11 @@ private:
|
||||
{
|
||||
template <class K, class... Args>
|
||||
size_t operator()(const K& key, Args&&...) const {
|
||||
#if PHMAP_DISABLE_MIX
|
||||
return h(key);
|
||||
#else
|
||||
return phmap_mix<sizeof(size_t)>()(h(key));
|
||||
#endif
|
||||
}
|
||||
const hasher& h;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user