cds
2.3.2
|
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. | |
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.