cds  2.3.2
cds::intrusive::split_list::expandable_bucket_table< GC, Node, Options > Class Template Reference

Expandable bucket table. More...

#include <cds/intrusive/details/split_list_base.h>

Data Structures

struct  aux_node_type
 Auxiliary node type. More...
 

Public Types

typedef GC gc
 Garbage collector.
 
typedef Node node_type
 Bucket node type.
 
typedef options::allocator allocator
 allocator
 
typedef options::memory_model memory_model
 Memory model for atomic operations.
 
typedef options::free_list free_list
 Free-list.
 

Public Member Functions

 expandable_bucket_table ()
 Constructs bucket table for 512K buckets. Load factor is 1.
 
 expandable_bucket_table (size_t nItemCount, size_t nLoadFactor)
 Creates the table with specified capacity rounded up to nearest power-of-two. More...
 
 ~expandable_bucket_table ()
 Destroys bucket table.
 
aux_node_typebucket (size_t nBucket) const
 Returns head node of the bucket nBucket.
 
void bucket (size_t nBucket, aux_node_type *pNode)
 Set pNode as a head of bucket nBucket.
 
aux_node_typealloc_aux_node ()
 Allocates auxiliary node; can return nullptr if the table exhausted.
 
void free_aux_node (aux_node_type *p)
 Places auxiliary node type to free-list.
 
size_t capacity () const
 Returns the capacity of the bucket table.
 
size_t load_factor () const
 Returns the load factor, i.e. average count of items per bucket.
 

Detailed Description

template<typename GC, typename Node, typename... Options>
class cds::intrusive::split_list::expandable_bucket_table< GC, Node, Options >

Expandable bucket table.

This bucket table can dynamically grow its capacity when necessary up to maximum bucket count.

Template parameter:

  • GC - garbage collector
  • Node - node type, must be derived from split_list::node
  • Options... - options

Options are:

Constructor & Destructor Documentation

◆ expandable_bucket_table()

template<typename GC , typename Node , typename... Options>
cds::intrusive::split_list::expandable_bucket_table< GC, Node, Options >::expandable_bucket_table ( size_t  nItemCount,
size_t  nLoadFactor 
)
inline

Creates the table with specified capacity rounded up to nearest power-of-two.

Parameters
nItemCountMax expected item count in split-ordered list
nLoadFactorLoad factor

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

cds 2.3.2 Developed by Maxim Khizhinsky aka khizmax and other contributors 2007 - 2017
Autogenerated Sun Dec 31 2017 12:10:47 by Doxygen 1.8.13