Khronos Public Bugzilla
Bug 470 - clarification for example for clSetUserEventStatus
clarification for example for clSetUserEventStatus
Status: NEW
Product: OpenCL
Classification: Unclassified
Component: Specification
1.1
All All
: P3 enhancement
: ---
Assigned To: Aaftab Munshi
OpenCL Working Group
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-10 07:08 PDT by RlyDontKnow
Modified: 2011-06-01 05:53 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description RlyDontKnow 2011-05-10 07:08:39 PDT
In the specification for clSetUserEventStatus the following code is taken as example usage that results in undefined behaviour:

[code]
ev1 = clCreateUserEvent(ctx, NULL);
clEnqueueWriteBuffer(cq, buf1, CL_FALSE, ..., 1, &ev1, NULL);
clEnqueueWriteBuffer(cq, buf2, CL_FALSE,...);
clReleaseMemObject(buf2);
clSetUserEventStatus(ev1, CL_COMPLETE);
[/code]

However this example only seems to be valid if CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE is not set for the command queue used because if it would be set the write to buf2 wouldn't in any way depend on the user event being fired so there's no reason that usage should be invalid.

Therefore a more detailed example or a more concrete specification than "any OpenCL APIs that release OpenCL objects except for event objects" (which may even be interpreted as releasing an object in a different context results in undefined behaviour) would be appreciated.