KhronosGroup / KhronosGroup/OpenCL-Docs

Unneeded/conflictive advise?

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

Description

In the `clEnqueueReadBuffer` (and many other similar functions) it is stated that:

> If the event_wait_list and the event arguments are not NULL, the event argument should not refer to an element of the event_wait_list array

However, such situation is not reflected on the list of returned errors. Said that, since `event` is a pointer to a `cl_event` to be generated and set by the implementation, I cannot see how that could be a problem, unless the user try to make a bizarre casting like the following:

```
err_code = clEnqueueReadBuffer(command_queue,
buffer,
blocking_read,
offset,
size,
ptr,
1,
event,
(cl_event*)(&event));
```

Of course, such casting (from `cl_event**` to `cl_event*`) will not fly below the compiler radar unless the user specifically ask to do that (like in the example above).

I really think that is related with the language, not with OpenCL. I suggest removing such comment from the docs

Contributor guide

Open the contributing guide

Research direction

Search the documentation sources for the quoted clEnqueueReadBuffer wording and compare the same advice across similar functions. Read the surrounding error descriptions and issue discussion before deciding whether the statement should be removed or clarified; done means the affected documentation consistently reflects the decision.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.