Ah, I'm a dummy. Forgot to initialize the command queue! No wonder why it

was invalid...
This commit is contained in:
2016-08-29 20:29:56 -07:00
parent c3902c2f6e
commit 5d9d3c4f4d
3 changed files with 7 additions and 5 deletions

View File

@@ -232,14 +232,15 @@ int CL_Wrapper::store_buffer(cl_mem buffer, std::string buffer_name){
int CL_Wrapper::run_kernel(std::string kernel_name){
const int WORKER_SIZE = 1;
const int WORKER_SIZE = 10;
size_t global_work_size[1] = { WORKER_SIZE };
cl_kernel kernel = kernel_map.at(kernel_name);
//error = clEnqueueTask(command_queue, kernel, 0, NULL, NULL);
error = clEnqueueNDRangeKernel(
command_queue, kernel,
1, NULL, global_work_size,
1, NULL, global_work_size,
NULL, 0, NULL, NULL);
if (assert(error, "clEnqueueNDRangeKernel"))