Commit 4ee0d411 authored by Doron Roberts-Kedes's avatar Doron Roberts-Kedes Committed by Facebook Github Bot

folly: Alias ConcurrentHashMapSIMD to use SIMDTable backend

Summary: The Impl param is last so its a pain to switch between BucketTable and SIMDTable in the common case where only KeyType and ValueType are specified. This diff enables ConcurrentHashMapSIMD<key, value>.

Reviewed By: djwatson

Differential Revision: D14916671

fbshipit-source-id: 980518179b87316ae344cbf96be4e6bcc032424e
parent 8a695b8f
......@@ -564,4 +564,26 @@ class ConcurrentHashMap {
mutable Atom<hazptr_obj_batch<Atom>*> batch_{nullptr};
};
#if FOLLY_SSE_PREREQ(4, 2) && !FOLLY_MOBILE
template <
typename KeyType,
typename ValueType,
typename HashFn = std::hash<KeyType>,
typename KeyEqual = std::equal_to<KeyType>,
typename Allocator = std::allocator<uint8_t>,
uint8_t ShardBits = 8,
template <typename> class Atom = std::atomic,
class Mutex = std::mutex>
using ConcurrentHashMapSIMD = ConcurrentHashMap<
KeyType,
ValueType,
HashFn,
KeyEqual,
Allocator,
ShardBits,
Atom,
Mutex,
detail::concurrenthashmap::simd::SIMDTable>;
#endif
} // namespace folly
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment