18 #ifndef FOEDUS_ASSORTED_PROB_COUNTER_HPP_
19 #define FOEDUS_ASSORTED_PROB_COUNTER_HPP_
49 inline void reset() { value_ = 0; }
61 const uint32_t int24_val = (int_val >> 4) & 0xFFFFFFU;
62 const uint32_t threshold = 1U << (24 -
value_);
63 if (int24_val < threshold) {
76 #endif // FOEDUS_ASSORTED_PROB_COUNTER_HPP_
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
uint8_t value_
Log arithmic counter of aborts.
Implements a probabilistic counter [Morris 1978].
void increment(UniformRandom *rnd)
#define ASSERT_ND(x)
A warning-free wrapper macro of assert() that has no performance effect in release mode even when 'x'...