Streaming and asynchronous notifications

Hi,

I’m looking for a way to do the following: sending a continuous data flow to the kernel from the host, decode these data and send an asynchronous notification when a specific value is detected.

I found in the forum that direct streaming is not possible in OpenCL but different methods can be used to split the buffer and then send it.
What about asynchronous notifications, is there any way to send a kind of interruption to the host ?

Thanks,
Frederic

event_t jobs_done_event
clEnqueueNDRange(..., &jobs_done_event)
RunNewThread(jobs_done_event);
//Another thread:
clWaitForEvent(jobs_done_event)
NotifyApplication()

More advance version of this approach is called the Observer design pattern. If you are using C++, you can try boost::async.

Thanks for this event method.

Do you know a simple way for the streaming ?

Is streaming like an ability to create buffers larger than VRAM size (tiled\sparse textures in graphics)? As you’ve said, it is not supported in OpenCL. You have to create buffers from relatively small chunks of data, perform your job on them, wait for kernels to finish, delete old buffer and proceed with the next chunk. If our task is not an online one, latency of having a GPU stall for few moments shouldn’t be worth consideration. Or simply buy a Tesla or FirePro :stuck_out_tongue: