Forum Discussion
Altera_Forum
Honored Contributor
10 years agoBTW: Why is the 3rd management kernel necessary at all? Is it possible to implement cyclic channel access between two kernels without use of this buffer management? Or is there is any negative implication for doing so? For example, why can't I just implementation something like this?
# pragma OPENCL EXTENSION cl_altera_channels : enable channel float16 feed_forward; channel float16 feed_back; __kernel void producer ( ... ){ ... Transfer data from global to local memory ... for (int i=0; i<iteration; i++){ ... Computations ... write_channel_altera(feed_forward, data_in_local_memory); data_in_local_memory = read_channel_altera(feed_back); } } __kernel void consumer ( ... ){ for (int i=0; i<iteration; i++){ data_in_local_memory = read_channel_altera(feed_forward); ... Computations ... write_channel_altera(feed_back, data_in_local_memory); } ... Transfer data from local back to global memory ... }