To create a host or device command-queue on a specific device, call the function
const cl_queue_properties* properties,
|clCreateCommandQueueWithProperties is missing before version 2.0. Also see extension cl_khr_create_command_queue.
context must be a valid OpenCL context.
device must be a device or sub-device associated with context. It can either be in the list of devices and sub-devices specified when context is created using clCreateContext or be a root device with the same device type as specified when context is created using clCreateContextFromType.
properties specifies a list of properties for the command-queue and their corresponding values. Each property name is immediately followed by the corresponding desired value. The list is terminated with 0. The list of supported properties is described in the table below. If a supported property and its value is not specified in properties, its default value will be used. properties can be
NULLin which case the default values for supported command-queue properties will be used.
errcode_ret will return an appropriate error code. If errcode_ret is
NULL, no error code is returned.
This is a bitfield and can be set to a combination of the following values:
missing before version 2.0.
Specifies the size of the device queue in bytes.
This can only be specified if
For best performance, this should be ≤
clCreateCommandQueueWithProperties returns a valid non-zero command-queue
and errcode_ret is set to
CL_SUCCESS if the command-queue is created
Otherwise, it returns a
NULL value with one of the following error values
returned in errcode_ret:
CL_INVALID_if context is not a valid context.
CL_INVALID_if device is not a valid device or is not associated with context.
CL_INVALID_if values specified in properties are not valid.
CL_INVALID_if values specified in properties are valid but are not supported by the device.
CL_OUT_if there is a failure to allocate resources required by the OpenCL implementation on the device.
CL_OUT_if there is a failure to allocate resources required by the OpenCL implementation on the host.
OF_ HOST_ MEMORY
For more information, see the OpenCL Specification
This page is extracted from the OpenCL Specification. Fixes and changes should be made to the Specification, not directly.