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

ID 683342
Date 4/22/2019
Public
Document Table of Contents

8.1.1. Emulating a Kernel that Passes Pipes or Channels by Reference

The Intel® FPGA SDK for OpenCL™ Emulator supports a kernel that passes pipes or channels by reference.

For example, you may emulate a kernel that has the following structure:


void my_function (pipe uint * pipe_ref,
                  __global uint * dst, int i)
{
    read_pipe (*pipe_ref, &dst[i]);
}

__kernel void
consumer (__global uint * restrict dst,
          read_only pipe uint __attribute__((blocking)) c0)
{
    for (int i=0;i<5;i++)
    {
        my_function( &c0, dst, i );
    }
}