diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2012-03-13 11:09:22 -0400 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2012-03-13 11:09:53 -0400 |
commit | d290aedf15294fc815746fe9c2931fe153c708b1 (patch) | |
tree | 08f6c1b0a5d87724dd3a2deb40bb228a26192f00 /util.c | |
parent | 8cc71da413c5966ff94f016f718110057129d503 (diff) |
Add cluCreateCommandQueue()
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -106,6 +106,23 @@ unsigned cluCreateContext(cl_context * context, cl_device_id device_id) return 1; } +unsigned cluCreateCommandQueue(cl_command_queue * command_queue, + cl_context context, cl_device_id device_id) +{ + cl_int error; + *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)); + return 0; + } + return 1; +} + #define CODE_CHUNK 64 unsigned cluCreateKernel(cl_context context, cl_device_id device_id, |