Template Class ConcurrentBucketMap

Class Documentation

template<typename Value>
class ConcurrentBucketMap

Public Functions

inline ConcurrentBucketMap()
ConcurrentBucketMap(const ConcurrentBucketMap&) = delete
ConcurrentBucketMap &operator=(const ConcurrentBucketMap&) = delete
inline ConcurrentBucketMap(ConcurrentBucketMap &&other)
template<typename F>
inline void doParallelForAllBuckets(const F &f)
inline size_t numBuckets() const
inline Bucket &getBucket(const size_t bucket)
inline void reserve_for_estimated_number_of_insertions(const size_t estimated_num_insertions)
inline void insert(const size_t &key, Value &&value)
inline void free()
inline void free(const size_t bucket)
inline void clear(const size_t bucket)
inline void clearParallel()

Private Types

using Bucket = std::vector<Value>

Private Functions

inline size_t align_to_next_power_of_two(const size_t size) const

Private Members

const size_t _num_buckets
const size_t _mod_mask
std::vector<SpinLock> _spin_locks
std::vector<Bucket> _buckets

Private Static Attributes

static constexpr size_t BUCKET_FACTOR = 128