cds
2.3.2
|
Metafunction converting option list to EllenBinTree traits. More...
#include <cds/intrusive/details/ellen_bintree_base.h>
Public Types | |
typedef implementation_defined | type |
Metafunction result. | |
Metafunction converting option list to EllenBinTree traits.
Options
are:
opt::hook
- hook used. Possible values are: ellen_bintree::base_hook
, ellen_bintree::member_hook
, ellen_bintree::traits_hook
. If the option is not specified, ellen_bintree::base_hook<>
is used.ellen_bintree::key_extractor
- key extracting functor, mandatory option. The functor has the following prototype: It should initialize dest
key from src
data. The functor is used to initialize internal nodes.opt::compare
- key compare functor. No default functor is provided. If the option is not specified, opt::less
is used.opt::less
- specifies binary predicate used for key compare. At least opt::compare
or opt::less
should be defined.opt::disposer
- the functor used for dispose removed nodes. Default is opt::v::empty_disposer
. Due the nature of GC schema the disposer may be called asynchronously. The disposer is used only for leaf nodes.opt::item_counter
- the type of item counting feature, by default it is disabled (atomicity::empty_item_counter
) To enable it use atomicity::item_counter
or atomicity::cache_friendly_item_counter
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).ellen_bintree::update_desc_allocator
- an allocator of update descriptors, default is CDS_DEFAULT_ALLOCATOR. Note that update descriptor is helping data structure with short lifetime and it is good candidate for pooling. The number of simultaneously existing descriptors is bounded and depends on the number of threads working with the tree and GC internals. A bounded lock-free container like cds::container::VyukovMPMCCycleQueue
is good candidate for the free-list of update descriptors, see cds::memory::vyukov_queue_pool free-list implementation. Also notice that size of update descriptor is constant and not dependent on the type of data stored in the tree so single free-list object can be used for all EllenBinTree
objects.opt::node_allocator
- the allocator for internal nodes. Default is CDS_DEFAULT_ALLOCATOR.opt::stat
- internal statistics, by default it is disabled (ellen_bintree::empty_stat
) To enable statistics use ellen_bintree::stat
opt::backoff
-
back-off strategy, by default no strategy is used (cds::backoff::empty
)opt::rcu_check_deadlock
- a deadlock checking policy for RCU-based tree, default is opt::v::rcu_throw_deadlock