cds  2.3.2
cds::sync::pow2_select_policy Struct Reference

The lock lock_array cell selection policy "division by modulo of power of 2". More...

#include <cds/sync/lock_array.h>

Public Member Functions

 pow2_select_policy (size_t nCapacity)
 Ctor. nCapacity must be power of two.
 
 pow2_select_policy (pow2_select_policy const &src)
 Copy constructor.
 
 pow2_select_policy (pow2_select_policy &&src)
 Move constructor.
 
size_t operator() (size_t nWhat, size_t) const
 Returns nWhat & (nPow2 - 1)
 

Static Public Member Functions

static bool is_capacity_accepted (size_t nCapacity)
 Checks if nCapacity is acceptable by policy. nCapacity must be power of two.
 

Detailed Description

The lock lock_array cell selection policy "division by modulo of power of 2".

This policy may be used if the size of lock array is equal to power of two.


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