Intel® FPGA SDK for OpenCL™ Pro Edition: Programming Guide

ID 683846
Date 12/19/2022
Public
Document Table of Contents
Give Feedback

5.4.5.1. Declaring the Channel Handle

Use a channel variable to define the connectivity between kernels or between kernels and I/O.

To read from and write to a channel, the kernel must pass the channel variable to each of the corresponding API calls.

  • Declare the channel handle as a file scope variable in the kernel source code using the following convention: channel <type> <variable_name>
    For example: channel int c;
  • The Intel® FPGA SDK for OpenCL™ channel extension supports simultaneous channel accesses by multiple variables declared in a data structure. Declare a struct data structure for a channel in the following manner:
    typedef struct type_ {
        int a;
        int b;
    } type_t;
    
    channel type_t foo;