Intel® High Level Synthesis Compiler Pro Edition: Reference Manual

ID 683349
Date 10/04/2021
Public

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

Document Table of Contents

13.8. Intel® HLS Compiler Pro Edition Scope Pragmas

Use the Intel® HLS Compiler scope pragmas to influence the rounding of floating-point operations and the ordering of arithmetic operations in your component at finer grain than the i++ command options.

Table 44.   Intel® HLS Compiler Pro Edition Scoped Pragmas Summary
Pragma Description
fp contract Controls the removal of intermediate rounding and conversion when possible within the code block that this pragma is applied to.
fp reassoc
Deprecated: This pragma is deprecated and will be removed in a later release of the Intel® HLS Compiler. Use the fp reassociate scoped pragma instead.
Controls the relaxing of the order of floating point arithmetic operations within the code block that this pragma is applied to.
fp reassociate Controls the relaxing of the order of floating point arithmetic operations within the code block that this pragma is applied to.

fp contract Scoped Pragma

Syntax
#pragma clang fp contract(state)
Description
This pragma controls whether the compiler can contract floating-point multiply and add or subtract operations into a single fused multiply-add (FMA), and controls whether the compiler skips intermediate rounding and conversions.

If multiple occurrences of this pragma affect the same scope, the pragma with the narrowest scope takes precedence.

The state parameter can be one of the following values:
  • off

    Turns off any permissions to fuse instructions into FMAs.

    The effect of the -ffp-contract=fast i++ command flag is suppressed for instructions within the scope of the pragma.

  • fast

    Allows the fusing of mult andadd instructions into an FMA, but might violate the language standard.

    For instructions with the scope of this pragma, the same optimizations as -ffp-contract=fast i++ command flag are enabled.

fp reassoc Scoped Pragma

Deprecated: This pragma is deprecated and will be removed in a later release of the Intel® HLS Compiler. Use the fp reassociate scoped pragma instead.
Syntax
#pragma clang fp reassoc(state)
Description
This pragma controls whether the compiler can relax the order of floating point operations requested by the source code. With some reordering, the compiler can optimize the hardware structure which improves the performance of your component.

If multiple occurrences of this pragma affect the same scope, the pragma with the narrowest scope takes precedence.

The state parameter can be one of the following values:
  • on

    Enables the effect of the -ffp-reassoc i++ command flag for instructions within the scope of the pragma.

  • off

    The effect of the -ffp-reassoc i++ command flag is suppressed for instructions within the scope of the pragma.

fp reassociate Scoped Pragma

Syntax
#pragma clang fp reassociate(state)
Description
This pragma controls whether the compiler can relax the order of floating point operations requested by the source code. With some reordering, the compiler can optimize the hardware structure which improves the performance of your component.

If multiple occurrences of this pragma affect the same scope, the pragma with the narrowest scope takes precedence.

The state parameter can be one of the following values:
  • on

    Enables the effect of the -ffp-reassociate i++ command flag for instructions within the scope of the pragma.

  • off

    The effect of the -ffp-reassociate i++ command flag is suppressed for instructions within the scope of the pragma.