Skip to content

Commit 4efd3a9

Browse files
authored
allow clSetCommandQueueProperty to return an error for non-OpenCL 1.0 devices (#980)
This follows the same pattern and text used by clSetProgramReleaseCallback, which may return an error for non-OpenCL 2.2 devices.
1 parent f8c93fe commit 4efd3a9

1 file changed

Lines changed: 14 additions & 11 deletions

File tree

api/opencl_runtime_layer.asciidoc

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -428,25 +428,28 @@ include::{generated}/api/version-notes/clSetCommandQueueProperty.asciidoc[]
428428
changed by {clSetCommandQueueProperty}. If _old_properties_ is `NULL`, it
429429
is ignored.
430430

431-
[NOTE]
432-
====
433-
Changing the {CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE} command-queue property
434-
will cause the OpenCL implementation to block until all previously queued
435-
commands in _command_queue_ have completed. This can be an expensive operation
436-
and therefore changes to this property should only be done when absolutely
437-
necessary.
438-
====
439-
440431
// refError
441432

433+
{clSetCommandQueueProperty} may unconditionally return an error if no
434+
devices in the context associated with _command_queue_ support modifying
435+
the properties of a command-queue.
436+
Support for modifying the properties of a command-queue is required only for
437+
OpenCL 1.0 devices.
438+
442439
{clSetCommandQueueProperty} returns {CL_SUCCESS} if the function is executed
443440
successfully.
444441
Otherwise, it returns one of the following errors:
445442

446443
* {CL_INVALID_COMMAND_QUEUE} if _command_queue_ is not a valid command-queue.
444+
* {CL_INVALID_OPERATION} if no devices in the context associated with
445+
_command_queue_ support modifying the properties of a command-queue.
447446
* {CL_INVALID_VALUE} if values specified in _properties_ are not valid.
448447
* {CL_INVALID_QUEUE_PROPERTIES} if values specified in _properties_ are
449448
valid but are not supported by the device.
449+
* {CL_OUT_OF_RESOURCES} if there is a failure to allocate resources required
450+
by the OpenCL implementation on the device.
451+
* {CL_OUT_OF_HOST_MEMORY} if there is a failure to allocate resources
452+
required by the OpenCL implementation on the host.
450453
--
451454

452455

@@ -5672,14 +5675,14 @@ object is deleted.
56725675
This provides a mechanism for an application to be notified when destructors
56735676
for program scope global variables are complete.
56745677

5678+
// refError
5679+
56755680
{clSetProgramReleaseCallback} may unconditionally return an error if no
56765681
devices in the context associated with _program_ support destructors for
56775682
program scope global variables.
56785683
Support for constructors and destructors for program scope global variables
56795684
is required only for OpenCL 2.2 devices.
56805685

5681-
// refError
5682-
56835686
{clSetProgramReleaseCallback} returns {CL_SUCCESS} if the function is executed
56845687
successfully.
56855688
Otherwise, it returns one of the following errors:

0 commit comments

Comments
 (0)