C Specification

To enable or disable the properties of a command-queue, call the function

cl_int clSetCommandQueueProperty(
    cl_command_queue command_queue,
    cl_command_queue_properties properties,
    cl_bool enable,
    cl_command_queue_properties* old_properties);

Parameters

  • command_queue specifies the command-queue being modified.

  • properties specifies the new list of properties for the command-queue. This is a bit-field and the supported properties are described in the Command-Queue Properties table for clCreateCommandQueue. Only command-queue properties specified in this table can be used, otherwise the value specified in properties is considered to be not valid.

  • enable determines whether the values specified by properties are enabled (if enable is CL_​TRUE) or disabled (if enable is CL_​FALSE) for the command-queue.

  • old_properties returns the command-queue properties before they were changed by clSetCommandQueueProperty. If old_properties is NULL, it is ignored.

Description

Changing the CL_​QUEUE_​OUT_​OF_​ORDER_​EXEC_​MODE_​ENABLE command-queue property will cause the OpenCL implementation to block until all previously queued commands in command_queue have completed. This can be an expensive operation and therefore changes to this property should only be done when absolutely necessary.

clSetCommandQueueProperty returns CL_​SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:

  • CL_​INVALID_​COMMAND_​QUEUE if command_queue is not a valid command-queue.

  • CL_​INVALID_​VALUE if values specified in properties are not valid.

  • CL_​INVALID_​QUEUE_​PROPERTIES if values specified in properties are valid but are not supported by the device.

See Also

Document Notes

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.

Copyright (c) 2014-2020 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.