KhronosGroup / KhronosGroup/OpenCL-Docs

clGetDeviceInfo() needs to be more precise about when CL_INVALID_VALUE will be returned

Open
#8 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
420
Forks
131
Avg merge
5d 13h
Merged PRs (30d)
11

Description

The clGetDeviceInfo() text should be more precise about when CL_INVALID_VALUE will be returned.

> 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 _table 4.3_ 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.

It should read:

> ... _param_value_size_ is less than the actual size in bytes of data being queried by _param_value_ ...

The previous wording is fine for integral types but vague when dealing with variable-sized return types like `char[]`.

This will make it clear that attempting to partially read a parameter with a return type of `char[]` will return CL_INVALID_VALUE.

Contributor guide

Open the contributing guide

Research direction

Search the documentation sources for the clGetDeviceInfo() entry and read its CL_INVALID_VALUE paragraph. Update the wording so it refers to the actual size of the data being queried, including variable-sized char[] results, and confirm the entry states that partial reads return CL_INVALID_VALUE.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.