35#ifndef _UTILS_LRUCOUNTER_HXX_
36#define _UTILS_LRUCOUNTER_HXX_
145 if (
counter_ == std::numeric_limits<T>::max())
150 int nlz = __builtin_clz((
unsigned)
counter_);
152 if ((global.
tick_ & ((1U << needzero) - 1)) == 0)
The GlobalLruCounter and a set of LruCounter<> objects cooperate in order to create an approximate LR...
GlobalLruCounter(unsigned bits_per_bit=2)
Constructor.
unsigned bitsPerBit_
Setting defining the exponent.
unsigned tick_
Rolling counter of global ticks.
Create an instance of this type for each object whose age needs to be measured with the GlobalLruCoun...
void tick(const GlobalLruCounter &global)
Increments the local counter.
void touch()
Signals that the object has been used now.
T counter_
Internal counter.