17 #ifndef THRILL_COMMON_STATS_COUNTER_HEADER 18 #define THRILL_COMMON_STATS_COUNTER_HEADER 31 template <
typename ValueType_,
bool Active = true>
35 template <
typename ValueType_>
53 bool Real()
const {
return true; }
95 template <
typename ValueType_>
107 bool Real()
const {
return false; }
134 #endif // !THRILL_COMMON_STATS_COUNTER_HEADER static uint_pair max()
return an uint_pair instance containing the largest value possible
This class provides a statistical counter that can easily be deactivated using a boolean template swi...
StatsCounter(const ValueType &initial=ValueType())
The constructor. Initializes the counter to 0.
void set_max(const ValueType &other)
bool Real() const
Whether the counter is active.
uint_pair & operator+=(const uint_pair &b)
addition operator (uses 64-bit arithmetic)
void set_max(const ValueType &)
ValueType value_
The counter's value.
uint_pair & operator++()
prefix increment operator (directly manipulates the integer parts)
bool Real() const
Whether the counter is active.
StatsCounter(const ValueType &=ValueType())
ValueType_ ValueType
The counter's value type.
ValueType_ ValueType
The counter's value type.