Reduce Floating-Point Rounding Operations (-Xsfpc)
-Xsfpc
)Include the
-Xsfpc
option in your
clang++
command to direct the
Intel® oneAPI
to remove intermediary floating-point rounding operations and conversions whenever possible and to carry additional bits to maintain precision.
DPC++/C++
CompilerImplementing this optimization control also changes the rounding mode. It rounds towards zero only at the end of a chain of floating-point arithmetic operations (that is, multiplications, additions, and subtractions).
Example
To direct the
Intel® oneAPI
to reduce the number of rounding operations, invoke the following command:
DPC++/C++
Compilerdpcpp -fintelfpga -Xshardware -Xsfpc <source_file>.cpp
For more information about rounding operations, refer to
Optimizing Floating-Point Operations.