summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2013-05-21 08:36:50 -0700
committerTom Stellard <thomas.stellard@amd.com>2013-05-21 08:36:50 -0700
commit5bbff546f1224ef87e3897cc76fdaf1f69fa4733 (patch)
treee12639d9780d33cca0c350c7057260bfb4211c88
parent12905ac620b83713b07ece763ff3c36fb3c2e7e5 (diff)
hello_world: Add call to clFinish()
-rw-r--r--hello_world.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hello_world.c b/hello_world.c
index b1b12be..dd8f7d9 100644
--- a/hello_world.c
+++ b/hello_world.c
@@ -186,6 +186,14 @@ int main(int argc, char ** argv)
fprintf(stderr, "clEnqueueNDRangeKernel() suceeded.\n");
+ error = clFinish(command_queue);
+ if (error != CL_SUCCESS) {
+ fprintf(stderr, "clFinish() failed: %s\n", clUtilErrorString(error));
+ return EXIT_FAILURE;
+ }
+
+ fprintf(stderr, "clFinish() succeeded.\n");
+
error = clEnqueueReadBuffer(command_queue,
out_buffer,
CL_TRUE, /* TRUE means it is a blocking read. */