-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcommon.h
49 lines (37 loc) · 1.13 KB
/
common.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
#ifndef PARAMS_H
#define PARAMS_H
using namespace std;
#define RANGE 2
#define UNPROCESSED -1
#define NOISE -2
#define DIMENSION 2
#define TREE_LEVELS (DIMENSION + 1)
#define THREAD_BLOCKS 8
#define THREAD_COUNT 16
#define MAX_SEEDS 128
#define EXTRA_COLLISION_SIZE 256
#define DATASET_COUNT 9
#define MINPTS 3
#define EPS 1.5
#define PARTITION_SIZE 3
#define POINTS_SEARCHED 9
/////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
#define gpuErrchk(ans) \
{ gpuAssert((ans), __FILE__, __LINE__); }
inline void gpuAssert(cudaError_t code, const char* file, int line,
bool abort = true) {
if (code != cudaSuccess) {
fprintf(stderr, "GPUassert: %s %s %d\n", cudaGetErrorString(code), file,
line);
if (abort) exit(code);
}
}
struct __align__(8) IndexStructure {
int dimension;
int dataBegin;
int dataEnd;
int childFrom;
};
#endif