|
cds
2.3.2
|
Metafunction converting option list to TreiberStack traits.
More...
#include <cds/container/treiber_stack.h>
Public Types | |
| typedef implementation_defined | type |
| Metafunction result. | |
Metafunction converting option list to TreiberStack traits.
Supported Options are:
opt::allocator - allocator (like std::allocator) used for allocating stack nodes. Default is CDS_DEFAULT_ALLOCATORopt::back_off - back-off strategy used. If the option is not specified, the cds::backoff::Default is used.opt::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).opt::item_counter - the type of item counting feature. Default is cds::atomicity::empty_item_counter, i.e. no item counting. Use cds::atomicity::item_counter to enable item counting.opt::stat - the type to gather internal statistics. Possible option value are: treiber_stack::stat, treiber_stack::empty_stat (the default), user-provided class that supports treiber_stack::stat interface.opt::enable_elimination - enable elimination back-off for the stack. Default value is false.If elimination back-off is enabled, additional options can be specified:
opt::buffer - an initialized buffer type for elimination array, see opt::v::initialized_static_buffer, opt::v::initialized_dynamic_buffer. The buffer can be any size: Exp2 template parameter of those classes can be false. The size should be selected empirically for your application and hardware, there are no common rules for that. Default is opt::v::initialized_static_buffer< any_type, 4 > .opt::random_engine - a random engine to generate a random position in elimination array. Default is opt::v::c_rand.opt::elimination_backoff - back-off strategy to wait for elimination, default is cds::backoff::delay<> opt::lock_type - a lock type used in elimination back-off, default is cds::sync::spin.Example: declare TreiberStack with item counting and internal statistics using make_traits