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

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

5.2.5. Marking Loops to Prevent Automatic Fusion (nofusion Pragma)

Use the nofusion pragma to direct the Intel® FPGA SDK for OpenCL™ Offline Compiler to avoid fusing the annotated loop with any of the adjacent loops.

To specify a loop to not be eligible for fusion, specify the nofusion pragma as follows:

#pragma nofusion 
for (int i = 0; i < N; ++i) {
    ...
}

In the following example, the compiler does not apply the loop fusion transformation to loops L1 and L2.

#pragma nofusion
L1: for (int j=0; j < N; ++j) {
   data[j] += Q;
}
L2: for (int i = 0; i < N; ++l) {
   output[i] = Q * data[i];
}