-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCudaWrapper.h
More file actions
32 lines (24 loc) · 1.01 KB
/
CudaWrapper.h
File metadata and controls
32 lines (24 loc) · 1.01 KB
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
#ifndef CUDAWRAPPER_H
#define CUDAWRAPPER_H
#include <stdlib.h>
namespace std
{
class CudaWrapper
{
private:
public:
static void handleCUDAError(int errorId);
static float* load2DArrayOnGPU(float** h_array, int rows, int columns);
static float* loadArrayOnGPU(float* h_array, int size);
static float** unload2DArrayFromGPU(float* d_array, int rows, int columns);
static float* unloadArrayFromGPU(float* d_array, int size);
static float* flattenArray(float** array, int rows, int columns);
static float** unflattenArray(float* array, int rows, int columns);
static void dotProduct(float* dummy, float* d_multiplier, float* d_multiplicand, float* d_product, int size1, int size2);
static void crossProduct(float* dummy, float* d_multiplier, float* d_multiplicand, float* d_product, int size1, int size2);
static void setDevice(int deviceNum);
static void profileDevices();
static void test();
};
}
#endif