forked from efficient/memc3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmemc3_config.h
68 lines (51 loc) · 1.13 KB
/
memc3_config.h
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#ifndef __MEMC3_CONFIG__
#define __MEMC3_CONFIG__
//#define MEMC3_ASSOC_CHAIN 1
#define MEMC3_ASSOC_CUCKOO 1
/*
* make sure one and only one option above is enabled
*/
#if (MEMC3_ASSOC_CUCKOO + MEMC3_ASSOC_CHAIN != 1)
#error "you must specify one and only one hashtable"
#endif
//#define MEMC3_CACHE_LRU 1
#define MEMC3_CACHE_CLOCK 1
#if (MEMC3_CACHE_LRU + MEMC3_CACHE_CLOCK != 1)
#error "you must specify one and only one eviction policy"
#endif
/*
* enable huge table to reduce TLB misses
*/
//#define MEMC3_ENABLE_HUGEPAGE
/*
* enable key comparison by casting bits into ints
*/
#define MEMC3_ENABLE_INT_KEYCMP
/*
* disable locking
*/
//#define MEMC3_LOCK_NONE 1
/*
* enable global locking
*/
//#define MEMC3_LOCK_GLOBAL 1
/*
* enable bucket locking
*/
//#define MEMC3_LOCK_FINEGRAIN 1
/*
* enable optimistic locking
*/
#define MEMC3_LOCK_OPT 1
#if (MEMC3_LOCK_OPT + MEMC3_LOCK_FINEGRAIN + MEMC3_LOCK_GLOBAL + MEMC3_LOCK_NONE != 1)
#error "you must specify one and only locking policy"
#endif
/*
* enable tag
*/
#define MEMC3_ENABLE_TAG
/*
* enable parallel cuckoo
*/
#define MEMC3_ASSOC_CUCKOO_WIDTH 1
#endif