2014-04-03 16:12:35 +00:00
|
|
|
#ifndef OCL_H
|
|
|
|
#define OCL_H
|
2012-01-24 09:23:44 +00:00
|
|
|
|
|
|
|
#include <stdbool.h>
|
2012-02-10 02:18:16 +00:00
|
|
|
|
2014-05-24 22:27:42 +00:00
|
|
|
typedef struct __clState {
|
2014-06-09 15:45:06 +00:00
|
|
|
cl_context context;
|
|
|
|
cl_kernel kernel;
|
|
|
|
cl_kernel *extra_kernels;
|
|
|
|
size_t n_extra_kernels;
|
|
|
|
cl_command_queue commandQueue;
|
|
|
|
cl_program program;
|
|
|
|
cl_mem outputBuffer;
|
|
|
|
cl_mem CLbuffer0;
|
2015-03-25 17:54:32 +00:00
|
|
|
cl_mem MidstateBuf;
|
2014-06-09 15:45:06 +00:00
|
|
|
cl_mem padbuffer8;
|
2015-11-09 16:15:15 +00:00
|
|
|
cl_mem buffer1;
|
|
|
|
cl_mem buffer2;
|
|
|
|
cl_mem buffer3;
|
2016-03-21 16:34:35 +00:00
|
|
|
unsigned char cldata[256];
|
2014-06-09 15:45:06 +00:00
|
|
|
bool goffset;
|
|
|
|
cl_uint vwidth;
|
|
|
|
size_t max_work_size;
|
|
|
|
size_t wsize;
|
|
|
|
size_t compute_shaders;
|
2011-06-14 00:32:54 +00:00
|
|
|
} _clState;
|
|
|
|
|
2012-02-04 03:47:23 +00:00
|
|
|
extern int clDevicesNum(void);
|
2014-03-23 06:25:55 +00:00
|
|
|
extern _clState *initCl(unsigned int gpu, char *name, size_t nameSize, algorithm_t *algorithm);
|
2014-04-03 16:12:35 +00:00
|
|
|
|
|
|
|
#endif /* OCL_H */
|