cds  2.3.2
cds::container::cuckoo::traits Struct Reference

Type traits for CuckooSet and CuckooMap classes. More...

#include <cds/container/details/cuckoo_base.h>

Public Types

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 comparison functor. More...
 
typedef opt::none less
 specifies binary predicate used for key comparison. More...
 
typedef cds::intrusive::cuckoo::traits::item_counter item_counter
 Item counter. More...
 
typedef CDS_DEFAULT_ALLOCATOR allocator
 Allocator type. More...
 
typedef opt::none node_allocator
 Node allocator type. More...
 
typedef cuckoo::list probeset_type
 Probe-set type. See probeset_type option for explanation.
 
typedef empty_stat stat
 Internal statistics.
 

Static Public Attributes

static bool const store_hash = false
 Store hash value into items. See cuckoo::store_hash for explanation.
 

Detailed Description

Type traits for CuckooSet and CuckooMap classes.

Member Typedef Documentation

◆ allocator

Allocator type.

The allocator type for allocating bucket tables. Default is CDS_DEFAULT_ALLOCATOR that is std::allocator

◆ compare

Key comparison functor.

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

◆ 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:

◆ 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.

◆ node_allocator

Node allocator type.

If this type is not set explicitly, the allocator type is used.


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