Forum Discussion
Altera_Forum
Honored Contributor
12 years agoSorry about the late response. Passing data like that is outside of the spec; however, in 13.1 channels were introduced. This allows one kernel to push data into a channel and another kernel can pull the data out of the channel. If you go to the design example page you'll find examples of using this feature if you search for "kernel-to-kernel channels": http://www.altera.com/support/examples/opencl/opencl.html
Many of these examples include single work-item kernels to implement the algorithms more efficiently on an FPGA. Normally when I think of using kernel-to-kernel channels I normally start thinking about using single work-item kernels as well. The reason why is that with the typical NDRange programming model work-items can be executed in any order, as a result data would be pushed/popped in the channel in that same unknown order. Using single work-item kernels you can control the execution order because only one work-item is in flight and the parallelism occurs at a loop pipelining level instead. That was probably a lot to chew on so I recommend taking a look at examples like FIR or FFT to learn more.