-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcompsup.h
33 lines (27 loc) · 831 Bytes
/
compsup.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
#ifndef __COMPSUP_H
#define __COMPSUP_H
// Intializes cuda
void cuda_init(int myrank);
// The compute class performs support computation
class Compute{
char* g_patterns;
char* g_dataset;
unsigned int* g_supports;
unsigned threadsCount; // number of threads
size_t g_trans_len;
size_t g_num_patterns;
size_t g_num_data;
public:
Compute(size_t trans_len, unsigned int num_threads):
threadsCount(num_threads),g_trans_len(trans_len),
g_patterns(NULL),g_dataset(NULL),g_supports(NULL){}
void set_data(char* dataset, size_t num_data);
inline void set_num_data(size_t n_data){g_num_data=n_data;}
void allocate_data(size_t num_data);
char* get_data_addr();
void set_patterns(char* patterns, size_t num_patterns);
void compute_support();
void get_supports(unsigned int* supports);
void free_all();
};
#endif