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