-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.h
More file actions
158 lines (118 loc) · 5.07 KB
/
Copy pathsettings.h
File metadata and controls
158 lines (118 loc) · 5.07 KB
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
#pragma once
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// optimization settings
//#define __USE_CSR_VERTEX_GROUPS__
//#define __SORT_ADJACENT_EDGES__
#define CELL_C_VERTEX_GROUPS_NUM 4
#ifdef __USE_GPU__
#define CSR_VERTEX_GROUPS_NUM 6
#else
#define CSR_VERTEX_GROUPS_NUM 6
#endif
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#ifdef __USE_NEC_SX_AURORA__
#warning "NEC SX-Aurora TSUBASA API is used!"
#pragma message("NEC SX-Aurora TSUBASA API is used!")
#endif
#ifdef __USE_MULTICORE__
//#warning "Multicore API is used!"
#pragma message("Multicore API is used!")
#endif
#ifdef __USE_GPU__
//#warning "GPU API is used!"
#pragma message("GPU API is used!")
#endif
#ifdef __USE_CSR_VERTEX_GROUPS__
//#warning "NEC SX-Aurora TSUBASA API is used!"
#pragma message("CSR vertex groups are used!")
#endif
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// SX-Aurora properties
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#ifdef __USE_NEC_SX_AURORA__
#define __USE_ASL__
#define VECTOR_LENGTH 256
#define VECTOR_LENGTH_POW 8
#define MAX_SX_AURORA_THREADS 8
#define LLC_CACHE_SIZE 16*1024*1024
#endif
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// GPU properties
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#ifdef __USE_GPU__
//#define _GLIBCXX_PARALLEL
#define VECTOR_LENGTH 32
#define VECTOR_LENGTH_POW 5
#define MAX_SX_AURORA_THREADS 8
#define LLC_CACHE_SIZE 6*1024*1024
#endif
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ARM/Intel/AMD multicore properties
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#ifdef __USE_MULTICORE__
#define _GLIBCXX_PARALLEL
#define VECTOR_LENGTH 32
#define VECTOR_LENGTH_POW 5
#define MAX_SX_AURORA_THREADS 256
#define LLC_CACHE_SIZE 64*1024
#endif
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// GPU properties
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define BLOCK_SIZE 1024
#define WARP_SIZE 32
#define TYPICAL_SM_COUNT 128
#define GPU_GRID_THRESHOLD_VALUE TYPICAL_SM_COUNT * BLOCK_SIZE
#define GPU_BLOCK_THRESHOLD_VALUE BLOCK_SIZE
#define GPU_WARP_THRESHOLD_VALUE WARP_SIZE
#define __USE_MANAGED_MEMORY__
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Common properties
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define MAX_WEIGHT 100
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// main framework settings
// define if user hasn't set any algorithm-specific
#ifndef VECTOR_ENGINE_THRESHOLD_VALUE
#ifdef __USE_GPU__
#define VECTOR_ENGINE_THRESHOLD_VALUE BLOCK_SIZE
#else
#define VECTOR_ENGINE_THRESHOLD_VALUE VECTOR_LENGTH * MAX_SX_AURORA_THREADS * 128
#endif
#endif
#ifndef VECTOR_CORE_THRESHOLD_VALUE
#define VECTOR_CORE_THRESHOLD_VALUE VECTOR_LENGTH
#endif
#ifndef FRONTIER_TYPE_CHANGE_THRESHOLD
#define FRONTIER_TYPE_CHANGE_THRESHOLD 0.3
#endif
#ifndef VE_FRONTIER_TYPE_CHANGE_THRESHOLD
#define VE_FRONTIER_TYPE_CHANGE_THRESHOLD 0.01
#endif
#ifndef VC_FRONTIER_TYPE_CHANGE_THRESHOLD
#define VC_FRONTIER_TYPE_CHANGE_THRESHOLD 0.01
#endif
#ifndef COLLECTIVE_FRONTIER_TYPE_CHANGE_THRESHOLD
#define COLLECTIVE_FRONTIER_TYPE_CHANGE_THRESHOLD 0.15
#endif
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//#define __PRINT_API_PERFORMANCE_STATS__ // prints inner api detailed performance stats, causes significant delays when active
#define __PRINT_SAMPLES_PERFORMANCE_STATS__ // prints samples stats (iterations, bandwidths, components stats)
//#define __SAVE_PERFORMANCE_STATS_TO_FILE__ // saves performance stats to files (useful for multiple batch launches)
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define VISUALISATION_SMALL_GRAPH_VERTEX_THRESHOLD 30
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Variables, used for API performance stats
#ifndef INT_ELEMENTS_PER_EDGE
#define INT_ELEMENTS_PER_EDGE 3.0
#endif
#ifndef COMPUTE_INT_ELEMENTS
#define COMPUTE_INT_ELEMENTS 2.0
#endif
#ifndef REDUCE_INT_ELEMENTS
#define REDUCE_INT_ELEMENTS 2.0
#endif
#ifndef GNF_INT_ELEMENTS
#define GNF_INT_ELEMENTS 1.0
#endif
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////