cds  2.3.2
cds::intrusive::split_list::traits Struct Reference

SplitListSet traits. More...

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

Inheritance diagram for cds::intrusive::split_list::traits:
cds::container::split_list::traits

Public Types

enum  { padding = cds::opt::cache_line_padding }
 Padding; default is cache-line padding.
 
typedef opt::none hash
 Hash function. More...
 
typedef cds::algo::bit_reversal::lookup bit_reversal
 Bit reversal algorithm. More...
 
typedef cds::atomicity::item_counter item_counter
 Item counter. More...
 
typedef CDS_DEFAULT_ALLOCATOR allocator
 Bucket table allocator. More...
 
typedef split_list::empty_stat stat
 Internal statistics (by default, disabled) More...
 
typedef opt::v::relaxed_ordering memory_model
 C++ memory ordering model. More...
 
typedef cds::backoff::Default back_off
 Back-off strategy.
 
typedef FreeListImpl free_list
 Free-list of auxiliary nodes. More...
 

Static Public Attributes

static const bool dynamic_bucket_table = true
 What type of bucket table is used. More...
 

Detailed Description

SplitListSet traits.

Member Typedef Documentation

◆ allocator

Bucket table allocator.

Allocator for bucket table. Default is CDS_DEFAULT_ALLOCATOR

◆ bit_reversal

Bit reversal algorithm.

Bit reversal is a significant part of split-list. There are several predefined algorithm in cds::algo::bit_reversal namespace, cds::algo::bit_reversal::lookup is the best general purpose one.

There are more efficient bit reversal algoritm for particular processor architecture, for example, based on x86 SIMD/AVX instruction set, see here

◆ free_list

Free-list of auxiliary nodes.

The split-list contains auxiliary nodes marked the start of buckets. To increase performance, there is a pool of preallocated aux nodes. The part of the pool is a free-list of aux nodes.

Default is:

◆ hash

Hash function.

Hash function converts the key fields of struct T stored in the split list into hash value of type size_t that is an index in hash table. By default, std::hash is used.

◆ item_counter

Item counter.

The item counting is an important part of SplitListSet algorithm: the empty() member function depends on correct item counting. Therefore, cds::atomicity::empty_item_counter is not allowed as a type of the option.

Default is cds::atomicity::item_counter; to avoid false sharing you may use atomicity::cache_friendly_item_counter

◆ memory_model

C++ memory ordering model.

Can be opt::v::relaxed_ordering (relaxed memory model, the default) or opt::v::sequential_consistent (sequentially consisnent memory model).

◆ stat

Internal statistics (by default, disabled)

Possible statistics types are: split_list::stat (enable internal statistics), split_list::empty_stat (the default, internal statistics disabled), user-provided class that supports split_list::stat interface.

Field Documentation

◆ dynamic_bucket_table

const bool cds::intrusive::split_list::traits::dynamic_bucket_table = true
static

What type of bucket table is used.

true - use split_list::expandable_bucket_table that can be expanded if the load factor of the set is exhausted. false - use split_list::static_bucket_table that cannot be expanded and is allocated in SplitListSet constructor.

Default is true.


The documentation for this struct 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