diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2012-03-14 14:43:56 -0400 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2012-03-14 14:43:56 -0400 |
commit | 8dc546eced1d35424853d25834e482c611e9f6ca (patch) | |
tree | 79fe1a7a6d800ea9a0a5e5181be0914311b6bf5b /util.h | |
parent | 6ee29b06afe45d05ae321791085b37d5693e05b2 (diff) |
Add more helper functions
Diffstat (limited to 'util.h')
-rw-r--r-- | util.h | 19 |
1 files changed, 12 insertions, 7 deletions
@@ -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); |