diff options
author | David Phillips <david@sighup.nz> | 2017-02-28 17:48:54 +1300 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2017-02-28 17:48:54 +1300 |
commit | db9fa60833870bf6f70795a8b0a5b477d57bf570 (patch) | |
tree | 5e9fcee9e27a6da546d49540b82d36da6c815d9a /trampoline.c | |
parent | 3399a428579e22725cfc4d874ec30cca249f4bb1 (diff) | |
download | fractal-gen-opencl-db9fa60833870bf6f70795a8b0a5b477d57bf570.tar.xz |
Make tramp_run_kernel return codes match its peers
Diffstat (limited to 'trampoline.c')
-rw-r--r-- | trampoline.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/trampoline.c b/trampoline.c index c486e61..6659223 100644 --- a/trampoline.c +++ b/trampoline.c @@ -360,10 +360,8 @@ int tramp_set_kernel_args(unsigned int s, unsigned int it) * Run the OpenCL kernel on the device with the specified arguments and wait * for it to complete execution * - * Returns CL_SUCCESS on success, otherwise an appropriate error value from - * the CL library is returned. + * Returns 0 on success, otherwise 1 * - * FIXME the return values go against the grain of the rest of the file */ int tramp_run_kernel() { @@ -375,14 +373,14 @@ int tramp_run_kernel() ret = clEnqueueNDRangeKernel(command_queue, kernel, 2, NULL, workgroup_sizes, NULL, 0, NULL, &event); if (ret != CL_SUCCESS) { - fprintf(stderr, "%d",ret); - return ret; + fprintf(stderr, "Failed to enqueue kernel run command: %s ", get_cl_error_string(ret)); + return 1; } clReleaseEvent(event); clFinish(command_queue); - return ret; + return 0; } /** |