-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefs.hpp
30 lines (23 loc) · 962 Bytes
/
defs.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma once
#include <cstdint>
#include <cstdlib>
//#define USE_BUCKET_TABLES 0 // use the bucket tables
using default_value_type = uint8_t;
constexpr uint8_t default_value_width = sizeof(default_value_type)*8;
#define USE_BONSAI_TABLES 1 // use the bonsai tables
#define USE_OVERFLOW_TABLES 1 // use the overflow approach
#define USE_STANDARD_TABLES 1 // use the overflow approach
#define USE_PLAIN_TABLES 1 // use the overflow approach
#define USE_CHMAP_TABLE 1 // use the overflow approach
// #ifdef __AVX2__
// #undef __AVX2__
// #endif//__AVX2__
#define INSTANCE_LENGTH 20 // length of the benchmark
#define CELERO_SAMPLING_COUNT 0 // number of total samples
#define CELERO_OPERATION_COUNT 3 // number of operations in one sample
#define MAX_LOAD_FACTOR 0.95
template<class T>
inline T random_int(const T& maxvalue) {
return static_cast<T>(std::rand() * (1.0 / (RAND_MAX + 1.0 )) * maxvalue);
}
inline void random_int_reset() { std::srand(1); }