Skip to content

Commit

Permalink
improve consistency for error descriptions too
Browse files Browse the repository at this point in the history
  • Loading branch information
bashbaug committed Sep 9, 2024
1 parent 75e4a0e commit 417afe0
Show file tree
Hide file tree
Showing 2 changed files with 143 additions and 136 deletions.
53 changes: 25 additions & 28 deletions api/opencl_platform_layer.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -312,10 +312,11 @@ Otherwise, it returns one of the following
errors footnote:[{fn-error-precedence}].

* {CL_INVALID_PLATFORM} if _platform_ is not a valid platform.
* {CL_INVALID_VALUE} if _param_name_ is not one of the supported values or
if size in bytes specified by _param_value_size_ is < size of return
type as specified in the <<platform-queries-table,OpenCL Platform
Queries>> table, and _param_value_ is not a `NULL` value.
* {CL_INVALID_VALUE} if _param_name_ is not one of the supported values, or
if the size in bytes specified by _param_value_size_ is less than size of
the return type specified in the
<<platform-queries-table, Platform Queries>> table
and _param_value_ is not `NULL`.
* {CL_OUT_OF_HOST_MEMORY} if there is a failure to allocate resources
required by the OpenCL implementation on the host.
--
Expand Down Expand Up @@ -2161,12 +2162,11 @@ successfully.
Otherwise, it returns one of the following errors:

* {CL_INVALID_DEVICE} if _device_ is not a valid device.
* {CL_INVALID_VALUE} if _param_name_ is not one of the supported values or
if size in bytes specified by _param_value_size_ is < size of return
type as specified in the <<device-queries-table, Device Queries>> table
and _param_value_ is not a `NULL` value or if _param_name_ is a value
that is available as an extension and the corresponding extension is not
supported by the device.
* {CL_INVALID_VALUE} if _param_name_ is not one of the supported values, or
if the size in bytes specified by _param_value_size_ is less than size of
the return type specified in the
<<device-queries-table, Device Queries>> table
and _param_value_ is not `NULL`.
* {CL_OUT_OF_RESOURCES} if there is a failure to allocate resources required
by the OpenCL implementation on the device.
* {CL_OUT_OF_HOST_MEMORY} if there is a failure to allocate resources
Expand Down Expand Up @@ -2458,17 +2458,15 @@ include::{generated}/api/version-notes/clGetDeviceIDsFromD3D10KHR.asciidoc[]

* _platform_ refers to the platform ID returned by {clGetPlatformIDs}.
* _d3d_device_source_ specifies the type of _d3d_object_, and must be one
of the values shown in the <<d3d10-device-object-types-table, Direct3D
10 object types that may be used by {clGetDeviceIDsFromD3D10KHR}>>
table.
of the values shown in the
<<d3d10-device-object-types-table, Direct3D 10 Object Types>> table.
* _d3d_object_ specifies the object whose corresponding OpenCL devices are
being queried.
The type of _d3d_object_ must be as specified in the
<<d3d10-device-object-types-table, Direct3D 10 object types that may be
used by {clGetDeviceIDsFromD3D10KHR}>> table.
<<d3d10-device-object-types-table, Direct3D 10 Object Types>> table.
* _d3d_device_set_ specifies the set of devices to return, and must be one
of the values shown in the <<d3d10-device-sets-table, Sets of devices
queriable using {clGetDeviceIDsFromD3D10KHR}>> table.
of the values shown in the
<<d3d10-device-sets-table, Direct3D 10 Device Sets>> table.
* _num_entries_ is the number of {cl_device_id_TYPE} entries that can be
added to _devices_.
If _devices_ is not `NULL` then _num_entries_ must be greater than zero.
Expand Down Expand Up @@ -2565,17 +2563,15 @@ include::{generated}/api/version-notes/clGetDeviceIDsFromD3D11KHR.asciidoc[]

* _platform_ refers to the platform ID returned by {clGetPlatformIDs}.
* _d3d_device_source_ specifies the type of _d3d_object_, and must be one
of the values shown in the <<d3d11-device-object-types-table, Direct3D
11 object types that may be used by {clGetDeviceIDsFromD3D11KHR}>>
table.
of the values shown in the
<<d3d11-device-object-types-table, Direct3D 11 Object Types>> table.
* _d3d_object_ specifies the object whose corresponding OpenCL devices are
being queried.
The type of _d3d_object_ must be as specified in the
<<d3d11-device-object-types-table, Direct3D 11 object types that may be
used by {clGetDeviceIDsFromD3D11KHR}>> table.
<<d3d11-device-object-types-table, Direct3D 11 Object Types>> table.
* _d3d_device_set_ specifies the set of devices to return, and must be one
of the values shown in the <<d3d11-device-sets-table, Sets of devices
queriable using {clGetDeviceIDsFromD3D11KHR}>> table.
of the values shown in the
<<d3d11-device-sets-table, Direct3D 11 Device Sets>> table.
* _num_entries_ is the number of {cl_device_id_TYPE} entries that can be
added to _devices_.
If _devices_ is not `NULL` then _num_entries_ must be greater than zero.
Expand Down Expand Up @@ -3586,10 +3582,11 @@ successfully.
Otherwise, it returns one of the following errors:

* {CL_INVALID_CONTEXT} if _context_ is not a valid context.
* {CL_INVALID_VALUE} if _param_name_ is not one of the supported values or
if size in bytes specified by _param_value_size_ is < size of return
type as specified in the <<context-info-table, Context Queries>>
table and _param_value_ is not a `NULL` value.
* {CL_INVALID_VALUE} if _param_name_ is not one of the supported values, or
if the size in bytes specified by _param_value_size_ is less than size of
the return type specified in the
<<context-info-table, Context Queries>> table
and _param_value_ is not `NULL`.
* {CL_OUT_OF_RESOURCES} if there is a failure to allocate resources required
by the OpenCL implementation on the device.
* {CL_OUT_OF_HOST_MEMORY} if there is a failure to allocate resources
Expand Down
Loading

0 comments on commit 417afe0

Please sign in to comment.