Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
11 years ago

specify depth of channel

Is there any way to set the depth of a channel? I see nothing in the documentation. I am getting compiler warnings about "Channel depths cannot be optimized".

Thanks

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    I found some information about channel depth in the programming guide.

    http://www.altera.com/literature/hb/opencl-sdk/aocl_programming_guide.pdf

    Implementing Buffered Channels Using the depth Channels Attribute

    You may have buffered or unbuffered channels in your kernel program. If there are imbalances in channel

    read and write operations, create buffered channels to prevent kernel stalls by including the

    depth

    attribute in your channel declaration. Buffered channels decouple the operation of concurrent work-items

    executing in different kernels

    Here is an example:

    channel int c __attribute__((depth(10)));