5.4 Creating a command queue

After creating your OpenCL context, use clCreateCommandQueue() to create a command queue.

OpenCL 1.2 does not support the automatic distribution of work to devices. If you want to share work between devices, or have dependencies between operations enqueued on devices, then you must create the command queues in the same OpenCL context.
Example command queue:
// Create a command-queue on the first device available
// on the created context

commandQueue = clCreateCommandQueue(context, device, properties, errcode_ref);
if (commandQueue == NULL)
{
       Cleanup();
       return 1;
}
If you have multiple OpenCL devices, you must:
  1. Create a command queue for each device.
  2. Divide up the work.
  3. Submit commands separately to each device.
Non-ConfidentialPDF file icon PDF versionARM 100614_0300_00_en
Copyright © 2012, 2013, 2015, 2016 ARM. All rights reserved.