bufferkdtree (C sources)
C source code for the Python bufferkdtree implementation
 All Classes Files Functions Variables Typedefs Macros
gpu_opencl.h
Go to the documentation of this file.
1 /*
2  * gpu_opencl.h
3  *
4  * Copyright (C) 2013-2016 Fabian Gieseke <fabian.gieseke@di.ku.dk>
5  * License: GPL v2
6  *
7  */
8 #ifndef BRUTE_INCLUDE_GPU_OPENCL_H_
9 #define BRUTE_INCLUDE_GPU_OPENCL_H_
10 
11 #include <stdlib.h>
12 #include <assert.h>
13 #include <math.h>
14 #include <stdio.h>
15 #include <time.h>
16 #include <pthread.h>
17 #include <string.h>
18 #include <sched.h>
19 #include <omp.h>
20 
21 #include "util.h"
22 #include "global.h"
23 #include "../../../include/opencl.h"
24 #include "../../../include/util.h"
25 #include "../../../include/float.h"
26 
27 // helper macros
28 #define STR_HELPER(x) #x
29 #define STR(x) STR_HELPER(x)
30 
31 // default workgroup sizes
32 #ifndef WORKGROUP_SIZE
33 #define WORKGROUP_SIZE 256
34 #endif
35 
43 
53 void fit_gpu(FLOAT_TYPE *X,
54  int nX,
55  int dX,
57  BRUTE_PARAMETERS *params);
58 
66  BRUTE_PARAMETERS *params);
67 
79 void neighbors_gpu(FLOAT_TYPE *Xtest,
80  int nXtest,
81  int dXtest,
82  FLOAT_TYPE *d_mins,
83  int *idx_mins,
85  BRUTE_PARAMETERS *params);
86 
87 #endif /* BRUTE_INCLUDE_GPU_OPENCL_H_ */
Definition: global.h:67
void init_gpu(BRUTE_RECORD *brute_record, BRUTE_PARAMETERS *params)
Definition: gpu_opencl.c:20
void fit_gpu(FLOAT_TYPE *X, int nX, int dX, BRUTE_RECORD *brute_record, BRUTE_PARAMETERS *params)
Definition: gpu_opencl.c:41
Definition: global.h:54
#define FLOAT_TYPE
Definition: float.h:17
void free_resources_gpu(BRUTE_RECORD *brute_record, BRUTE_PARAMETERS *params)
Definition: gpu_opencl.c:83
void neighbors_gpu(FLOAT_TYPE *Xtest, int nXtest, int dXtest, FLOAT_TYPE *d_mins, int *idx_mins, BRUTE_RECORD *brute_record, BRUTE_PARAMETERS *params)
Definition: gpu_opencl.c:117