Khronos Public Bugzilla
Bug 470 - clarification for example for clSetUserEventStatus
Summary: clarification for example for clSetUserEventStatus
Status: NEW
Alias: None
Product: OpenCL
Classification: Unclassified
Component: Specification (show other bugs)
Version: 1.1
Hardware: All All
: P3 enhancement
Target Milestone: ---
Assignee: Aaftab Munshi
QA Contact: OpenCL Working Group
Depends on:
Reported: 2011-05-10 07:08 PDT by RlyDontKnow
Modified: 2011-06-01 05:53 PDT (History)
1 user (show)

See Also:


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:

ev1 = clCreateUserEvent(ctx, NULL);
clEnqueueWriteBuffer(cq, buf1, CL_FALSE, ..., 1, &ev1, NULL);
clEnqueueWriteBuffer(cq, buf2, CL_FALSE,...);
clSetUserEventStatus(ev1, CL_COMPLETE);

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.