-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathrts-config.h
101 lines (78 loc) · 2.26 KB
/
rts-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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#ifndef _CONFIG_H
#define _CONFIG_H
/* Functions defined in the library and visible outside the library. */
#ifndef CHEETAH_API
#ifdef __ELF__
#define CHEETAH_API __attribute((visibility("protected")))
#else
#define CHEETAH_API
#endif
#endif
/* Functions defined in the library and not visible outside the library. */
#ifndef CHEETAH_INTERNAL
#define CHEETAH_INTERNAL __attribute((visibility("hidden")))
#endif
#ifndef CHEETAH_INTERNAL_NORETURN
#define CHEETAH_INTERNAL_NORETURN __attribute((noreturn, visibility("hidden")))
#endif
#ifndef __CILKRTS_VERSION
#define __CILKRTS_VERSION 0x0
#endif
#ifndef __CILKRTS_ABI_VERSION
#define __CILKRTS_ABI_VERSION 4
#endif
#ifndef CILK_DEBUG
#define CILK_DEBUG 1
#endif
#ifndef CILK_ENABLE_ASAN_HOOKS
#define CILK_ENABLE_ASAN_HOOKS 0
#endif
#ifndef CILK_STATS
#define CILK_STATS 0
#endif
#ifndef CILK_CACHE_LINE
// Use 128-bit cache lines to account for adjacent-cache-line prefetchers.
#define CILK_CACHE_LINE 128
#endif
#ifndef BUSY_PAUSE
#define BUSY_PAUSE 1
#endif
#ifndef BUSY_LOOP_SPIN
#define BUSY_LOOP_SPIN 4096 / BUSY_PAUSE
#endif
#ifndef ENABLE_THIEF_SLEEP
#define ENABLE_THIEF_SLEEP 1
#endif
#ifndef ENABLE_EXTENSION
#define ENABLE_EXTENSION 1
#endif
#ifndef ENABLE_WORKER_PINNING
#define ENABLE_WORKER_PINNING 0
#endif
#ifndef MIN_NUM_PAGES_PER_STACK
#define MIN_NUM_PAGES_PER_STACK 4 // must be greater than 1
#endif
_Static_assert(MIN_NUM_PAGES_PER_STACK >= 2, "Invalid Cheetah RTS config: MIN_NUM_PAGES_PER_STACK must be at least 2");
#ifndef MAX_NUM_PAGES_PER_STACK
#define MAX_NUM_PAGES_PER_STACK 2000
#endif
_Static_assert(MAX_NUM_PAGES_PER_STACK >= MIN_NUM_PAGES_PER_STACK, "Invalid Cheetah RTS config: MAX_NUM_PAGES_PER_STACK must be at least MIN_NUM_PAGES_PER_STACK");
#ifndef DEFAULT_NPROC
#define DEFAULT_NPROC 0 // 0 for # of cores available
#endif
#ifndef DEFAULT_DEQ_DEPTH
#define DEFAULT_DEQ_DEPTH 1024
#endif
#ifndef LG_STACK_SIZE
#define LG_STACK_SIZE 20 // 1 MBytes
#endif
#ifndef DEFAULT_STACK_SIZE
#define DEFAULT_STACK_SIZE (1U << LG_STACK_SIZE) // 1 MBytes
#endif
#ifndef DEFAULT_FIBER_POOL_CAP
#define DEFAULT_FIBER_POOL_CAP 8 // initial per-worker fiber pool capacity
#endif
#ifndef MAX_CALLBACKS
#define MAX_CALLBACKS 32 // Maximum number of init or exit callbacks
#endif
#endif // _CONFIG_H