Status information in the EnqueueNDRange
@@ -136,8 +136,11 @@ JNIEXPORT jlong JNICALL Java_uk_ac_manchester_tornado_drivers_opencl_OCLCommandQ
OPENCL_DECODE_WAITLIST(array4, events, numEvents);
cl_event kernelEvent = NULL;
- OPENCL_SOFT_ERROR("clEnqueueNDRangeKernel",
- clEnqueueNDRangeKernel((cl_command_queue) queue_id, (cl_kernel) kernel_id, (cl_uint) work_dim, (size_t*) global_work_offset, (size_t*) global_work_size, (size_t*) local_work_size, (cl_uint) numEvents, (numEvents == 0)? NULL: (cl_event*) events, &kernelEvent), 0);
+ cl_int status = clEnqueueNDRangeKernel((cl_command_queue) queue_id, (cl_kernel) kernel_id, (cl_uint) work_dim, (size_t*) global_work_offset, (size_t*) global_work_size, (size_t*) local_work_size, (cl_uint) numEvents, (numEvents == 0)? NULL: (cl_event*) events, &kernelEvent);
+ if (status != CL_SUCCESS) {
+ printf("[ERROR clEnqueueNDRangeKernel]: %d\n", status);
+ }
+ OPENCL_SOFT_ERROR("clEnqueueNDRangeKernel", status, 0);
if (PRINT_KERNEL_EVENTS) {
long kernelTime = getTimeEvent(kernelEvent);
