summaryrefslogtreecommitdiff
path: root/util.h
blob: 5a1d2f55e4e6c514f9b6d3370dee0140467528af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

struct clu_context {
   cl_device_id device_id;
   cl_context cl_ctx;
   cl_command_queue command_queue;
   cl_kernel kernel;
};

const char * cluErrorString(cl_int error);
unsigned cluInitGpuDevice(cl_device_id * device_id);
unsigned cluCreateContext(cl_context * context, cl_device_id device_id);
unsigned cluCreateCommandQueue(cl_command_queue * command_queue,
                               cl_context context, cl_device_id device_id);
unsigned cluCreateKernel(cl_context context, cl_device_id device_id,
                         cl_kernel * kernel, const char * kernel_name);
unsigned cluSimpleInit(struct clu_context * context, const char * kernel_name);
unsigned cluKernelSetArg(cl_kernel kernel, cl_uint index, size_t size,
                         const void * value);