Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve param_value_size consistency #1254

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 35 additions & 35 deletions api/opencl_platform_layer.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,9 @@ include::{generated}/api/version-notes/clGetPlatformInfo.asciidoc[]
If _param_value_ is `NULL`, it is ignored.
* _param_value_size_ specifies the size in bytes of memory pointed to by
_param_value_.
This size in bytes must be {geq} size of return type specified in the
<<platform-queries-table, Platform Queries>> table.
This size must be greater than or equal to the size of the return type
specified in the <<platform-queries-table, Platform Queries>> table.
If _param_value_ is `NULL`, it is ignored.
* _param_value_size_ret_ returns the actual size in bytes of data being
queried by _param_name_.
If _param_value_size_ret_ is `NULL`, it is ignored.
Expand Down Expand Up @@ -311,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 @@ -454,8 +456,9 @@ include::{generated}/api/version-notes/clGetDeviceInfo.asciidoc[]
If _param_value_ is `NULL`, it is ignored.
* _param_value_size_ specifies the size in bytes of memory pointed to by
_param_value_.
This size in bytes must be {geq} size of return type specified in the
<<device-queries-table, Device Queries>> table.
This size must be greater than or equal to the size of the return type
specified in the <<device-queries-table, Device Queries>> table.
If _param_value_ is `NULL`, it is ignored.
* _param_value_size_ret_ returns the actual size in bytes of data being
queried by _param_name_.
If _param_value_size_ret_ is `NULL`, it is ignored.
Expand Down Expand Up @@ -2159,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 @@ -2456,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 @@ -2563,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 @@ -3502,15 +3500,16 @@ include::{generated}/api/version-notes/clGetContextInfo.asciidoc[]
If _param_value_ is `NULL`, it is ignored.
* _param_value_size_ specifies the size in bytes of memory pointed to by
_param_value_.
This size must be greater than or equal to the size of return type as
described in the <<context-info-table, Context Attributes>> table.
This size must be greater than or equal to the size of the return type
specified in the <<context-info-table, Context Queries>> table.
If _param_value_ is `NULL`, it is ignored.
* _param_value_size_ret_ returns the actual size in bytes of data being
queried by _param_name_.
If _param_value_size_ret_ is `NULL`, it is ignored.

The list of supported _param_name_ values and the information returned in
_param_value_ by {clGetContextInfo} is described in the
<<context-info-table, Context Attributes>> table.
<<context-info-table, Context Queries>> table.

[[context-info-table]]
.List of supported param_names by {clGetContextInfo}
Expand Down Expand Up @@ -3583,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 Attributes>>
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