clSetCommandQueueProperty

Enable or disable the properties of a command-queue.

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 queried.

properties

Specifies the new command-queue properties to be applied to command_queue. Only command-queue properties specified for clCreateCommandQueue can be set in properties; 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. The allowed property values are the same as those specified for clCreateCommandQueue.

old_properties

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

Notes

As specified for clCreateCommandQueue, the CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE command-queue property determines whether the commands in a command-queue are executed in-order or out-of-order. Changing this 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 the CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE property should be only done when absolutely necessary.

It is possible that a device(s) becomes unavailable after a context and command-queues that use this device(s) have been created and commands have been queued to command-queues. In this case the behavior of OpenCL API calls that use this context (and command-queues) are considered to be implementation-defined. The user callback function, if specified when the context is created, can be used to record appropriate information in the errinfo, private_info arguments passed to the callback function when the device becomes unavailable.

Errors

Returns CL_SUCCESS if the command-queue properties are successfully updated. Otherwise, it returns the following:

  • Returns CL_INVALID_COMMAND_QUEUE if command_queue is not a valid command-queue.
  • Returns CL_INVALID_VALUE if the values specified in properties are not valid.
  • Returns CL_INVALID_QUEUE_PROPERTIES if the values specified in properties are not supported by the device.

Specification

OpenCL Specification

Also see

clCreateCommandQueue, clGetCommandQueueInfo, clReleaseCommandQueue, clRetainCommandQueue

Copyright © Copyright © 2007-2009 The Khronos Group Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and/or associated documentation files (the "Materials"), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to the condition that this copyright notice and permission notice shall be included in all copies or substantial portions of the Materials.