STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions
stapl::detail::hash_buckets< Bucket, Traits > Class Template Reference

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.
 

Detailed Description

template<typename Bucket, typename Traits>
class stapl::detail::hash_buckets< Bucket, Traits >

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.

Member Function Documentation

◆ grow()

template<typename Bucket, typename Traits>
template<typename Container >
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.


The documentation for this class was generated from the following file: