|
cds
2.3.2
|
SplitListSet traits. More...
#include <cds/intrusive/details/split_list_base.h>
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... | |
SplitListSet traits.
Bucket table allocator.
Allocator for bucket table. Default is CDS_DEFAULT_ALLOCATOR
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
| typedef FreeListImpl cds::intrusive::split_list::traits::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:
cds::intrusive::FreeList - if architecture and/or compiler does not support double-width CAS primitivecds::intrusive::TaggedFreeList - if architecture and/or compiler supports double-width CAS primitive 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.
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
C++ memory ordering model.
Can be opt::v::relaxed_ordering (relaxed memory model, the default) or opt::v::sequential_consistent (sequentially consisnent memory model).
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.
|
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.