summaryrefslogtreecommitdiff
path: root/get_global_id.c
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2012-03-13 11:09:22 -0400
committerTom Stellard <thomas.stellard@amd.com>2012-03-13 11:09:53 -0400
commitd290aedf15294fc815746fe9c2931fe153c708b1 (patch)
tree08f6c1b0a5d87724dd3a2deb40bb228a26192f00 /get_global_id.c
parent8cc71da413c5966ff94f016f718110057129d503 (diff)
Add cluCreateCommandQueue()
Diffstat (limited to 'get_global_id.c')
-rw-r--r--get_global_id.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/get_global_id.c b/get_global_id.c
index 65e20d4..34fd753 100644
--- a/get_global_id.c
+++ b/get_global_id.c
@@ -29,19 +29,10 @@ int main(int argc, char ** argv)
return EXIT_FAILURE;
}
- command_queue = clCreateCommandQueue(context,
- device_id,
- 0, /* Command queue properties */
- &error); /* Error code */
-
- if (error != CL_SUCCESS) {
- fprintf(stderr, "clCreateCommandQueue() failed: %s\n",
- cluErrorString(error));
+ if (!cluCreateCommandQueue(&command_queue, context, device_id)) {
return EXIT_FAILURE;
}
- fprintf(stderr, "clCreateCommandQueue() succeeded.\n");
-
if (!cluCreateKernel(context, device_id, &kernel, "global_id")) {
return EXIT_FAILURE;
}