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

ID 683846
Date 9/26/2022

A newer version of this document is available. Customers should click here to go to the newest version.

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];