cds  1.4.0
Public Types | Public Member Functions | Protected Attributes
cds::intrusive::split_list::static_bucket_table< GC, Node, Options > Class Template Reference

Static bucket table. More...

#include <cds/intrusive/split_list_base.h>

Public Types

typedef GC gc
 Garbage collector.
 
typedef Node node_type
 Bucket node type.
 
typedef std::atomic< node_type * > table_entry
 Table entry type.
 
typedef
cds::details::Allocator
< table_entry, typename
options::allocator > 
bucket_table_allocator
 Bucket table allocator.
 
typedef options::memory_model memory_model
 Memory model for atomic operations.
 

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)
 Constructs. More...
 
 ~static_bucket_table ()
 Destroy bucket table.
 
node_typebucket (size_t nBucket) const
 Returns head node of bucket nBucket.
 
void bucket (size_t nBucket, node_type *pNode)
 Set head node pNode of bucket nBucket.
 
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.
 

Protected Attributes

const size_t m_nLoadFactor
 load factor (average count of items per bucket)
 
const size_t m_nCapacity
 Bucket table capacity.
 
table_entrym_Table
 Bucket table.
 

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:

Options are:

Constructor & Destructor Documentation

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

Constructs.

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

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

cds 1.4.0 Developed by Maxim Khiszinsky aka khizmax 2007 - 2012
Autogenerated Mon May 20 2013 00:38:01 by Doxygen 1.8.3.1