cds
2.3.2
|
Metafunction converting option list to feldman_hashset::traits
.
More...
#include <cds/container/details/feldman_hashset_base.h>
Public Types | |
typedef implementation_defined | type |
Metafunction result. | |
Metafunction converting option list to feldman_hashset::traits
.
Supported Options
are:
feldman_hashset::hash_accessor
- mandatory option, hash accessor functor. It is most-important feature of FeldmanHashSet
. That functor must return a reference to fixed-sized hash value of data node. The return value of that functor specifies the type of hash value.Example:
feldman_hashset::hash_size
- the size of hash value in bytes. By default, the size of hash value is sizeof( hash_type )
. Sometimes it is not correct, for example, for that 6-byte struct static_assert
will be thrown: hash_size
explicitly.Value 0
means sizeof( hash_type )
.
feldman_hashset::hash_splitter
- a hash splitter algorithm This trait specifies hash bit-string splitter algorithm. By default, cds::algo::number_splitter
is used if HashType
is a number, cds::algo::split_bitstring
otherwise.opt::allocator
- item allocator Default is CDS_DEFAULT_ALLOCATORopt::node_allocator
- array node allocator. Allocator for array nodes. The allocator is used for creating headNode
and arrayNode
when the set grows. Default is CDS_DEFAULT_ALLOCATORopt::compare
- hash comparison functor. No default functor is provided. If the option is not specified, the opt::less
is used.opt::less
- specifies binary predicate used for hash comparison. If less
and compare
are not specified, memcmp()
-like bit-wise hash comparator is used because the hash value is treated as fixed-sized bit-string.opt::back_off
- back-off strategy used. If the option is not specified, the cds::backoff::Default
is used.opt::item_counter
- the type of item counting feature. The item counting is an important part of FeldmanHashSet
algorithm: the empty()
member function depends on correct item counting. Therefore, atomicity::empty_item_counter
is not allowed as a type of the option.Default is atomicity::item_counter
. To avoid false sharing you can aldo use 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).opt::stat
- internal statistics. By default, it is disabled (feldman_hashset::empty_stat
). To enable it use feldman_hashset::stat
opt::rcu_check_deadlock
- a deadlock checking policy for RCU-based FeldmanHashSet Default is opt::v::rcu_throw_deadlock