summaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'util.h')
-rw-r--r--util.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/util.h b/util.h
index d2977bf..ecaab60 100644
--- a/util.h
+++ b/util.h
@@ -3,16 +3,21 @@ struct cltest_context {
cl_device_id device_id;
cl_context cl_ctx;
cl_command_queue command_queue;
+ cl_mem out_buffer;
cl_kernel kernel;
};
-const char * cltestErrorString(cl_int error);
-unsigned cltestInitGpuDevice(cl_device_id * device_id);
-unsigned cltestCreateContext(cl_context * context, cl_device_id device_id);
-unsigned cltestCreateCommandQueue(cl_command_queue * command_queue,
+const char * clTestErrorString(cl_int error);
+unsigned clTestInitGpuDevice(cl_device_id * device_id);
+unsigned clTestCreateContext(cl_context * context, cl_device_id device_id);
+unsigned clTestCreateCommandQueue(cl_command_queue * command_queue,
cl_context context, cl_device_id device_id);
-unsigned cltestCreateKernel(cl_context context, cl_device_id device_id,
+unsigned clTestCreateKernel(cl_context context, cl_device_id device_id,
cl_kernel * kernel, const char * kernel_name);
-unsigned cltestSimpleInit(struct cltest_context * context, const char * kernel_name);
-unsigned cltestKernelSetArg(cl_kernel kernel, cl_uint index, size_t size,
+unsigned clTestSimpleInit(struct cltest_context * context, const char * kernel_name);
+unsigned clTestSetOutputBuffer(struct cltest_context * context, unsigned buffer_size);
+unsigned clTestKernelSetArg(cl_kernel kernel, cl_uint index, size_t size,
const void * value);
+unsigned clTestEnqueueNDRangeKernel(cl_command_queue command_queue,
+ cl_kernel kernel, cl_uint work_dim, const size_t * global_work_size,
+ const size_t * local_work_size);