Forum Discussion
Altera_Forum
Honored Contributor
8 years agoIf the two kernels are not going to overlap, then there is no need to do this. Just enqueue both kernels in the same queue one after the other, and the second kernel will automatically launch after the first one finishes execution in which case the shared buffer will have been fully updated by the time the second kernel starts.
Note that global memory consistency in OpenCL is only guaranteed *after* kernel execution; trying to synchronize global memory between two kernels using messages sent via channels will *not* work (I tried it once, got incorrect results).