|
cds
1.4.0
|
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_type * | bucket (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_entry * | m_Table |
| Bucket table. | |
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 usedNode - node type, must be a type based onnode templateOptions... - optionsOptions are:
opt::allocator - allocator used to allocate bucket table. Default is CDS_DEFAULT_ALLOCATORopt::memory_model - memory model used. Possible types are opt::v::sequential_consistent, opt::v::relaxed_ordering
|
inline |
Constructs.
| nItemCount | Max expected item count in split-ordered list |
| nLoadFactor | Load factor |