Quantcast
Channel: Community : All Content - OpenCL
Viewing all articles
Browse latest Browse all 2400

Why not a clWaitAnyEvent?

$
0
0

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.


Viewing all articles
Browse latest Browse all 2400

Latest Images

Trending Articles



Latest Images