forked from dcampora/cl_forward
-
Notifications
You must be signed in to change notification settings - Fork 1
/
KernelDefinitions.h
62 lines (50 loc) · 1.27 KB
/
KernelDefinitions.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
// Used to prefer a device type over another one
#define DEVICE_CPU 0
#define DEVICE_GPU 1
#define DEVICE_ACCELERATOR 2
#define DEVICE_PREFERENCE DEVICE_GPU
#define DEVICE_NUMBER 0
#define NUMTHREADS_X 64
#define MAX_NUMTHREADS_Y 16
#define NUM_ATOMICS 5
#define USE_SHARED_FOR_HITS false
#define SH_HIT_MULT 2
#define MAX_TRACKS 3000
#define MAX_TRACK_SIZE 24
#define REQUIRED_UNIQUES 0.6f
#define MIN_HITS_TRACK 3
#define MAX_FLOAT FLT_MAX
#define MIN_FLOAT -FLT_MAX
#define MAX_SKIPPED_MODULES 3
#define TTF_MODULO 2000
#define PARAM_W 3966.94f // 0.050 / sqrt( 12. )
#define PARAM_MAXXSLOPE 0.4f
#define PARAM_MAXYSLOPE 0.3f
#define PARAM_MAXXSLOPE_CANDIDATES 0.4f
#define PARAM_TOLERANCE 0.6f
#define PARAM_TOLERANCE_CANDIDATES 0.6f
#define MAX_SCATTER 0.000016f
#define SENSOR_DATA_HITNUMS 3
#define RESULTS_FOLDER "results"
#define PRINT_SOLUTION false
#define PRINT_VERBOSE false
#define ASSERTS_ENABLED false
#if ASSERTS_ENABLED == true
#include "assert.h"
#define ASSERT(EXPR) ASSERT_CL_RETURN(EXPR, #EXPR);
#else
#define ASSERT(EXPR)
#endif
struct Sensor {
unsigned int hitStart;
unsigned int hitNums;
};
struct Hit {
float x;
float y;
float z;
};
struct Track { // 4 + 24 * 4 = 100 B
unsigned int hitsNum;
unsigned int hits[MAX_TRACK_SIZE];
};