cds  2.3.2
cds::intrusive::striped_set::rational_load_factor_resizing< Numerator, Denominator > Struct Template Reference

Rational load factor resizing policy. More...

#include <cds/intrusive/striped_set/resizing_policy.h>

Public Member Functions

template<typename Container , typename Bucket >
bool operator() (size_t nSize, Container const &container, Bucket const &) const
 Main policy operator returns true when resizing is needed. More...
 
void reset ()
 Resets internal state of the policy (does nothing)
 

Detailed Description

template<size_t Numerator, size_t Denominator = 1>
struct cds::intrusive::striped_set::rational_load_factor_resizing< Numerator, Denominator >

Rational load factor resizing policy.

When total item count in a container exceeds container.bucket_count() * Numerator / Denominator then resizing is needed.

This policy is stateless: Numerator and Denominator specifies in compile time as template arguments

Member Function Documentation

◆ operator()()

template<size_t Numerator, size_t Denominator = 1>
template<typename Container , typename Bucket >
bool cds::intrusive::striped_set::rational_load_factor_resizing< Numerator, Denominator >::operator() ( size_t  nSize,
Container const &  container,
Bucket const &   
) const
inline

Main policy operator returns true when resizing is needed.

Parameters
nSizeCurrent item count of container
containerContainer

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