-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdbscan.h
83 lines (80 loc) · 2.39 KB
/
dbscan.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/*! \brief Structure storing close or neighbor features of a
* feature and used for
* the internal workings of dbscan.
*/
typedef struct {
int * members; /*!< the features in this neighbourhood */
int n_members; /*!< number of features in this neighborhood */
} neighbors;
#if defined(_SCAN_SMITH_WATERMAN_GPU) || defined(_SCAN_SMITH_WATERMAN_MPI_GPU)
typedef struct {
cl_device_id* devices;
cl_platform_id* platform;
cl_context_properties* contprop;
cl_program* programs;
cl_command_queue* cmdq;
cl_kernel* kernel;
cl_context* contexts;
cl_mem* acc_sequences;
cl_mem* acc_sequence_lengths;
cl_mem* acc_distances;
int * local_distances;
int num_devs;
} opencl_stuff;
#endif
split_set dbscan_L1(dataset ds, float epsilon, int minpts);
split_set dbscan_L2(dataset ds, float epsilon, int minpts);
split_set dbscan_SW(dataset ds, float epsilon, int minpts);
#if defined(_SCAN_SMITH_WATERMAN_GPU) || defined (_SCAN_SMITH_WATERMAN_MPI_GPU)
void opencl_destroy(opencl_stuff ocl);
#endif
#if defined(_SCAN_SMITH_WATERMAN_GPU)
opencl_stuff opencl_initialization(dataset ds);
split_set dbscan_SW_GPU(dataset ds, float epsilon, int minpts,
opencl_stuff ocl);
void adaptive_dbscan(split_set (*dbscanner) (dataset,
float,
int,
opencl_stuff),
dataset ds,
float epsilon_start,
float epsilon_inc,
int minpts,
char* split_files_prefix,
int n_threads
);
#elif defined(_SCAN_SMITH_WATERMAN_MPI_GPU)
opencl_stuff opencl_initialization(int mpi_stride, dataset ds);
split_set dbscan_SW_GPU_MPI(dataset ds, float epsilon, int minpts,
opencl_stuff ocl, int mpi_rank, int mpi_size);
void adaptive_dbscan(split_set (*dbscanner) (dataset,
float,
int,
opencl_stuff,
int,
int),
int mpi_rank,
int mpi_size,
dataset ds,
float epsilon_start,
float epsilon_inc,
int minpts,
char* split_files_prefix,
int n_threads
);
int adaptive_dbscan_mpi_client(dataset ds,
int mpi_rank,
int mpi_size);
#else
void adaptive_dbscan(split_set (*dbscanner) (dataset,
float,
int),
dataset ds,
float epsilon_start,
float epsilon_inc,
int minpts,
char* split_files_prefix,
int n_threads
);
#endif
void create_cluster_files(char* prefix, split_set s, dataset ds);