Holds bucket count and array of buckets for hashtable used in edge_storage (and eventually by edge_container). Encapsulated here to properly manage lifetime, so that buckets are destroyed after the Boost.Intrusive unordered_set they serve. More...
Public Member Functions | |
hash_buckets (void) | |
Explicitly call constructor of union member m_initial_buckets so that buckets are initialized prior to use. | |
~hash_buckets () | |
Explicitly call destructor of external bucket storage if we have spilled out of the initial, in-frame set of buckets. | |
size_t | size (void) const |
template<typename Container > | |
void | grow (Container &ct) const |
Allocate a new set of buckets and call rehash on the passed unordered_set. More... | |
Bucket * | get (void) const |
Returns raw pointer to bucket array, whether it be stored in frame or on the heap. | |
Holds bucket count and array of buckets for hashtable used in edge_storage (and eventually by edge_container). Encapsulated here to properly manage lifetime, so that buckets are destroyed after the Boost.Intrusive unordered_set they serve.
void stapl::detail::hash_buckets< Bucket, Traits >::grow | ( | Container & | ct | ) | const |
Allocate a new set of buckets and call rehash on the passed unordered_set.
Handle corner case of in frame buckets with placement new call. In steady state case, move assignment on unique_ptr storage cleans up previously allocated buffers.