-
Notifications
You must be signed in to change notification settings - Fork 0
/
data.h
72 lines (48 loc) · 1.88 KB
/
data.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
/*
coverTree
data.h
Contains the class data for the dataset, and all operations pertaining to the dataset
*/
#ifndef __data_h__
#define __data_h__
#include <string>
namespace coverTree {
class data {
private:
FILE* file_pointer_;
float* data_host_;
float* data_host_transpose_;
float* data_device_;
float* data_device_transpose_;
unsigned int dimension_;
unsigned int number_of_points_;
string filename_;
void allocate_memory_to_data_host(unsigned int size_in_bytes);
void deallocate_memory_to_data_host(void);
void allocate_memory_to_data_host_transpose(unsigned int size_in_bytes);
void deallocate_memory_to_data_host_transpose(void);
void allocate_memory_to_data_device(unsigned int size_in_bytes);
void deallocate_memory_to_data_device(void);
void allocate_memory_to_data_device_transpose(unsigned int size_in_bytes);
void deallocate_memory_to_data_device_transpose(void);
FILE* get_file_pointer(void);
void set_file_pointer(FILE* file_pointer);
unsigned int get_file_size(void);
void load_file_to_data_host(FILE* file_pointer);
void set_data_host(float* data_host);
void transpose_data_host(void);
void set_data_device_transpose(float* data_device_transpose);
public:
data();
~data();
float* get_data_host(void);
float* get_data_device_transpose(void);
unsigned int get_dimension(void);
void set_dimension(unsigned int Dimension);
unsigned int get_number_of_points(void);
void set_number_of_points(unsigned int number_of_points);
string get_filename();
void set_filename(string filename);
};
}
#endif /* __data_h__ */