35 #define CACHE_LINE_SIZE 64
41 template <
typename Type,
int N>
46 size_t offset(
size_t index)
const UNIV_NOTHROW {
51 #ifdef HAVE_SCHED_GETCPU
55 template <
typename Type,
int N>
60 size_t get_rnd_index() const UNIV_NOTHROW {
62 size_t cpu = sched_getcpu();
73 template <
typename Type,
int N>
86 template <
typename Type,
int N=1>
91 size_t offset(
size_t index)
const UNIV_NOTHROW {
97 size_t get_rnd_index() const UNIV_NOTHROW {
120 bool validate() UNIV_NOTHROW {
125 for (
size_t i = 0; i < UT_ARR_SIZE(
m_counter); i += n) {
126 for (
size_t j = 1; j < n - 1; ++j) {
139 void add(Type n) UNIV_NOTHROW {
151 void add(
size_t index, Type n) UNIV_NOTHROW {
164 void sub(Type n) UNIV_NOTHROW {
176 void sub(
size_t index, Type n) UNIV_NOTHROW {
185 operator Type() const UNIV_NOTHROW {
188 for (
size_t i = 0; i < N; ++i) {