summaryrefslogtreecommitdiffstats
path: root/config.h
blob: a0d29f37ac6bd65773db7eca517d0c289ff909fc (plain)
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
#define VERBOSE
#define GPU_DESC

#define USE_HW_CONTER

#define GPU_PAGE 65536

#define MIN(a, b) (((a) > (b))?(b):(a))
#define MAX(a, b) (((a) < (b))?(b):(a))

#ifdef SIZE
# if SIZE >= 65536
#   define TLP_SIZE 64
#   define PAGE_SIZE 65536
#   define NUM_PAGES (SIZE / GPU_PAGE)
# elif SIZE >= 256
#   define TLP_SIZE 64
#   define PAGE_SIZE SIZE
#   define NUM_PAGES 1
# else
#   define TLP_SIZE (SIZE / 4)
#   define PAGE_SIZE SIZE
#   define NUM_PAGES 1
# endif

# define GPU_ITERS MIN(100, MAX(4, 4l * 1024 * 1024 * 1024 / SIZE))
# define ITERS MIN(100, MAX(10, 4l * 1024 * 1024 * 1024 / SIZE))
#else 
# define ITERS 100
# define GPU_ITERS 100

# define TLP_SIZE 64
# define PAGE_SIZE 4096
# define NUM_PAGES 4
# define SIZE (NUM_PAGES * PAGE_SIZE)
#endif