summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2013-05-21 08:50:49 -0700
committerTom Stellard <thomas.stellard@amd.com>2013-05-21 08:50:49 -0700
commitb666fc37aa65e33c30e9714c88d87144c7da2c22 (patch)
tree7ccb75db66669e939299e67b5ecf38771f874e5d
parent452d441052e7a29c1cebba3c1de0128438baa3d9 (diff)
Add clFinish() call to clSimpleEnqueueNDRangeKernel
-rw-r--r--cl_simple.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/cl_simple.c b/cl_simple.c
index 0b37d52..1dc565e 100644
--- a/cl_simple.c
+++ b/cl_simple.c
@@ -123,6 +123,13 @@ unsigned clSimpleEnqueueNDRangeKernel(cl_command_queue command_queue,
return 0;
}
+ error = clFinish(command_queue);
+
+ if (error != CL_SUCCESS) {
+ fprintf(stderr, "clFinish() failed: %s\n", clUtilErrorString(error));
+ return 0;
+ }
+
return 1;
}