Intel® FPGA SDK for OpenCL™ Standard Edition: Programming Guide
Visible to Intel only — GUID: avv1521227838967
Ixiasoft
Visible to Intel only — GUID: avv1521227838967
Ixiasoft
5.4.5.2. Implementing Blocking Channel Writes
Where:
channel_id identifies the buffer to which the channel connects, and it must match the channel_id of the corresponding read channel (read_channel_intel).
data is the data that the channel write operation writes to the channel.
<type> defines a channel data width. Follow the OpenCL™ conversion rules to ensure that data the kernel writes to a channel is convertible to <type>.
//Defines chan, a kernel file-scope channel variable. channel long chan; /*Defines the kernel which reads eight bytes (size of long) from global memory, and passes this data to the channel.*/ __kernel void kernel_write_channel( __global const long * src ) { for (int i = 0; i < N; i++) { //Writes the eight bytes to the channel. write_channel_intel(chan, src[i]); } }