cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

maxdz8
Elite

Why not a clWaitAnyEvent?

The behavior of select(...) is to wake up when at least one watched descriptor is "ready".

Pthreads take it easy with a single condition variable to pthread_cond_wait.

Windows has WaitForMultipleEvents(...) which allows to sleep pretty much on everything. It will wake up when at least one event is triggered but it is possible to require all events to be triggered.

clWaitForEvents returns CL_SUCCESS if the execution status of all events in event_list is CL_COMPLETE. Whoops. This explains a bug report I had some time ago.

I am in the process of implementing the event callback system to allow wait on a single event which will be triggered by the first event reaching CL_COMPLETE. Leaving aside I must do that with care, I wonder why there's no such thing as clWaitForAnyEvent.

0 Likes
1 Solution

That makes perfect sense to me. But what do I know.

Obviously AMD does not define the OpenCL standard or API. An engineer from here may chime in on this, but I suspect the best thing to do is to get this feedback into Khronos. I recommend you go here: Public discussions about the Khronos Dynamic Media APIs and make the same request.

Hope this helps.

View solution in original post

0 Likes
11 Replies