Intel® oneAPI DPC++/C++ Compiler Developer Guide and Reference

ID 767253
Date 9/08/2022
Public

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

Document Table of Contents

Use the -fp-model, /fp Option

The -fp-model (Linux) or /fp (Windows) option allows you to control the optimizations on floating-point data. You can use this option to tune the performance, level of accuracy, or result consistency for floating-point applications across platforms and optimization levels.

You can use keywords to specify the semantics to be used. The keywords specified for this option may influence the choice of math routines that are invoked. Many routines in the libirc, libm, and libsvml libraries are more highly optimized for Intel microprocessors than for non-Intel microprocessors. Possible values of the keywords are as follows:

Keyword

Description

precise

Enables value-safe optimizations on floating-point data.

fast

Enables more aggressive optimizations on floating-point data.

strict

Enables precise , disables contractions, and enables pragma stdc fenv_access.

NOTE:

Using the default option keyword -fp-model fast or /fp:fast, you may get significant differences in your result depending on whether the compiler uses x87 or Intel® Streaming SIMD Extensions (Intel® SSE)/Intel® Advanced Vector Extensions (Intel® AVX) instructions to implement floating-point operations. Results are more consistent when the other option keywords are used.

See Also