cds  2.3.2
cds::intrusive::cuckoo::traits Struct Reference

Type traits for CuckooSet class. More...

#include <cds/intrusive/cuckoo_set.h>

Public Types

typedef base_hook hook
 Hook used. More...
 
typedef cds::opt::none hash
 Hash functors tuple. More...
 
typedef cuckoo::striping mutex_policy
 Concurrent access policy. More...
 
typedef opt::none equal_to
 Key equality functor. More...
 
typedef opt::none compare
 Key comparing functor. More...
 
typedef opt::none less
 specifies binary predicate used for key comparison. More...
 
typedef atomicity::item_counter item_counter
 Item counter. More...
 
typedef CDS_DEFAULT_ALLOCATOR allocator
 Allocator type. More...
 
typedef intrusive::opt::v::empty_disposer disposer
 Disposer. More...
 
typedef empty_stat stat
 Internal statistics. Available statistics: cuckoo::stat, cuckoo::empty_stat.
 

Detailed Description

Type traits for CuckooSet class.

Member Typedef Documentation

◆ allocator

Allocator type.

The allocator type for allocating bucket tables.

◆ compare

Key comparing functor.

No default functor is provided. If the option is not specified, the less is used.

◆ disposer

typedef intrusive::opt::v::empty_disposer cds::intrusive::cuckoo::traits::disposer

Disposer.

The disposer functor is used in CuckooSet::clear() member function to free set's node.

◆ equal_to

Key equality functor.

Default is std::equal_to<T>

◆ hash

Hash functors tuple.

This is mandatory type and has no predefined one.

At least, two hash functors should be provided. All hash functor should be orthogonal (different): for each i,j: i != j => h[i](x) != h[j](x) . The hash functors are defined as std::tuple< H1, H2, ... Hn > : @code cds::opt::hash< std::tuple< h1, h2 > > @endcode The number of hash functors specifies the number k - the count of hash tables in cuckoo hashing.

To specify hash tuple in traits you should use cds::opt::hash_tuple:

◆ hook

◆ item_counter

Item counter.

The type for item counting feature. Default is cds::atomicity::item_counter

Only atomic item counter type is allowed.

◆ less

specifies binary predicate used for key comparison.

Default is std::less<T>.

◆ mutex_policy

Concurrent access policy.

Available opt::mutex_policy types:

Default is cuckoo::striping.


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:41 by Doxygen 1.8.13