Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Floating point options

lklawrie
Beginner
466 Views

What is the difference between compiler options /fp and /qfp-speculation?

Should one use both?

Linda

0 Kudos
1 Reply
Steven_L_Intel1
Employee
466 Views
/Qfp-speculation controls the "speculation" optimization where operations are executed earlier in the program than the code calls for even if the code might conditionally not do the operation. This optimization can take advantage of conditional-move instructions and, on Itanium systems, a major architectural feature, to increase speed. The compiler assumes that the operation will not cause an exception. Using the switch can control this.

/fp controls how floating point operations are done with an eye to the result. Some optimizations (reassociation, reduction, etc.) can change FP results somewhat, and other optimizations can't be used if you read or modify the FP control state.

These switches are independent.
0 Kudos
Reply