-
Notifications
You must be signed in to change notification settings - Fork 31
/
gpu-mc.hpp
50 lines (37 loc) · 1.09 KB
/
gpu-mc.hpp
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
#ifndef HPMC_H
#define HPMC_H
#define __NO_STD_VECTOR // Use cl::vector instead of STL version
#define __CL_ENABLE_EXCEPTIONS
#define __USE_GL_INTEROP
#include <iostream>
#include <fstream>
#include <utility>
#include <string>
#include <GL/glew.h>
#include <GL/glut.h>
#include "OpenCLUtilities/openCLGLUtilities.hpp"
#include <math.h>
using namespace cl;
typedef unsigned int uint;
typedef unsigned char uchar;
void setupOpenGL(int * argc, char ** argv, int size, int sizeX, int sizeY, int sizeZ, float spacingX, float spacingY, float spacingZ);
void setupOpenCL(unsigned char * voxels, int size);
void run();
void renderScene();
void idle();
void reshape(int width, int height);
void keyboard(unsigned char key, int x, int y);
void mouseMovement(int x, int y);
int prepareDataset(uchar ** voxels, int sizeX, int sizeY, int sizeZ);
void updateScalarField();
void histoPyramidConstruction();
void histoPyramidTraversal(int sum);
char * getCLErrorString(cl_int error);
typedef struct {
int x,y,z;
} Size;
typedef struct {
float x,y,z;
} Sizef;
#define BUFFER_OFFSET(i) ((char *)NULL + (i))
#endif