|
template<size_t COUNT> |
Type | Counter::add (Shards< COUNT > &shards, size_t id, size_t n) |
| Increment the counter for a shard by n. More...
|
|
template<size_t COUNT> |
Type | Counter::sub (Shards< COUNT > &shards, size_t id, size_t n) |
| Decrement the counter for a shard by n. More...
|
|
template<size_t COUNT> |
Type | Counter::inc (Shards< COUNT > &shards, size_t id) |
| Increment the counter of a shard by 1. More...
|
|
template<size_t COUNT> |
Type | Counter::dec (Shards< COUNT > &shards, size_t id) |
| Decrement the counter of a shard by 1. More...
|
|
template<size_t COUNT> |
Type | Counter::get (const Shards< COUNT > &shards, size_t id) noexcept |
| Get the counter value for a shard. More...
|
|
template<size_t COUNT> |
void | Counter::for_each (const Shards< COUNT > &shards, Function &&f) noexcept |
| Iterate over the shards. More...
|
|
template<size_t COUNT> |
Type | Counter::total (const Shards< COUNT > &shards) noexcept |
| Get the total value of all shards. More...
|
|
template<size_t COUNT> |
void | Counter::clear (Shards< COUNT > &shards) noexcept |
| Clear the counter - reset to 0. More...
|
|
template<size_t COUNT> |
void | Counter::copy (Shards< COUNT > &dst, const Shards< COUNT > &src) noexcept |
| Copy the counters, overwrite destination. More...
|
|
template<size_t COUNT> |
void | Counter::add (Shards< COUNT > &dst, const Shards< COUNT > &src) noexcept |
| Accumulate the counters, add source to destination. More...
|
|
Counter utility class
Created 2012/04/12 by Sunny Bains