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

Static 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.
 
typedef atomics::atomic< aux_node_type * > table_entry
 Table entry type.
 
typedef cds::details::Allocator< table_entry, allocatorbucket_table_allocator
 Bucket table allocator.
 

Public Member Functions

 static_bucket_table ()
 Constructs bucket table for 512K buckets. Load factor is 1.
 
 static_bucket_table (size_t nItemCount, size_t nLoadFactor)
 Creates the table with specified size rounded up to nearest power-of-two. More...
 
 ~static_bucket_table ()
 Destroys bucket table.
 
aux_node_typebucket (size_t nBucket) const
 Returns head node of 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 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::static_bucket_table< GC, Node, Options >

Static bucket table.

Non-resizeable bucket table for SplitListSet class. The capacity of table (max bucket count) is defined in the constructor call.

Template parameter:

  • GC - garbage collector
  • Node - node type, must be a type based on split_list::node
  • Options... - options

Options are:

Constructor & Destructor Documentation

◆ static_bucket_table()

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

Creates the table with specified size 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:48 by Doxygen 1.8.13