Visible to Intel only — GUID: GUID-0ADDE233-4E78-4AEC-B35A-79C580D70316
Visible to Intel only — GUID: GUID-0ADDE233-4E78-4AEC-B35A-79C580D70316
fimf-domain-exclusion, Qimf-domain-exclusion
Indicates the input arguments domain on which math functions must provide correct results.
Syntax
Linux: |
-fimf-domain-exclusion=classlist[:funclist] |
Windows: |
/Qimf-domain-exclusion:classlist[:funclist] |
Arguments
classlist |
Is one of the following:
|
||||||||||||||||||||||||||||||||||
funclist |
Is an optional list of one or more math library functions to which the attribute should be applied. Do not specify the standard Fortran name of the math function; you must specify the actual math library name. If you specify more than one function, they must be separated with commas. Precision-specific variants like sin and sinf are considered different functions, so you would need to use -fimf-domain-exclusion=4:sin,sinf (or /Qimf-domain-exclusion:4:sin,sinf) to specify infinities for both the single-precision and double-precision sine functions. You also can specify the symbol /f to denote single-precision divides, symbol / to denote double-precision divides, symbol /l to denote extended-precision divides, and symbol /q to denote quad-precision divides. For example, you can specify: -fimf-domain-exclusion=4 or /Qimf-domain-exclusion:4 -fimf-domain-exclusion=5:/,powf or /Qimf-domain-exclusion:5:/,powf -fimf-domain-exclusion=23:log,logf,/,sin,cosf or /Qimf-domain-exclusion:23:log,logf,/,sin,cosf If you don't specify argument funclist, the domain restrictions apply to all math library functions. |
Default
Zero ("0") |
The compiler uses default heuristics when calling math library functions. |
Description
This option indicates the input arguments domain on which math functions must provide correct results. It specifies that your program will function correctly if the functions specified in funclist do not produce standard conforming results on the number classes.
This option can affect runtime performance and the accuracy of results. As more classes are excluded, faster code sequences can be used.
If you need to define the accuracy for a math function of a certain precision, specify the function name of the precision that you need. For example, if you want double precision, you can specify :sin; if you want single precision, you can specify :sinf, as in -fimf-domain-exclusion=subnormals:sin or /Qimf-domain-exclusion:subnormals:sin, or -fimf-domain-exclusion=extremes:sqrtf or /Qimf-domain-exclusion:extremes:sqrtf.
If you do not specify any function names, then the setting applies to all functions (and to all precisions). However, as soon as you specify an individual function name, the setting applies only to the function of corresponding precision. So, for example, sinf applies only to the single-precision sine function, sin applies only to the double-precision sine function, sinl applies only to the extended-precision sine function, etc.
Many routines in libraries LIBM (Math Library) and SVML (Short Vector Math Library) are more highly optimized for Intel® microprocessors than for non-Intel microprocessors.
The standard Fortran names for the various math intrinsic functions do not match the math library names of the math intrinsic functions. You must find the actual math library name that is generated for the relevant Fortran math intrinsic.
One way to do this is to generate assembly code by using one of the following options:
Linux
-S
Windows
/Fa or /S
The assembly code will show the actual math library name.
For example, if you create a program that contains a call to SIN(x) where x is declared as REAL(KIND=4) and then use option S to produce assembly code for the program, the assembly code will show a call to sinf.
To indicate the input arguments domain for the single-precision sine function, you should specify:
Linux
-fimf-domain-exclusion=sinf
Windows
/Qimf-domain-exclusion:sinf
This option only applies to host compilation. When offloading is enabled, it does not impact device-specific compilation. Offloading can only be enabled when using ifx.
Product and Performance Information |
---|
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex. Notice revision #20201201 |
IDE Equivalent
Alternate Options
None
Examples
Consider the following single-precision sequence for function exp2f:
Operation: | y = exp2f(x) |
Accuracy: | 1.014 ulp |
Instructions: | 4 (2 without fix-up) |
The following shows the 2-instruction sequence without the fix-up:
vcvtfxpntps2dq zmm1 {k1}, zmm0, 0x50 // zmm1 <-- rndToInt(2^24 * x) vexp223ps zmm1 {k1}, zmm1 // zmm1 <-- exp2(x)
However, the above 2-instruction sequence will not correctly process NaNs. To process Nans correctly, the following fix-up must be included following the above instruction sequence:
vpxord zmm2, zmm2, zmm2 // zmm2 <-- 0 vfixupnanps zmm1 {k1}, zmm0, zmm2 {aaaa} // zmm1 <-- QNaN(x) if x is NaN <F>
If the vfixupnanps instruction is not included, the sequence correctly processes any arguments except NaN values. For example, the following options generate the 2-instruction sequence:
-fimf-domain-exclusion=2:exp2f <- NaNs are excluded (2 corresponds to NaNs) -fimf-domain-exclusion=6:exp2f <- NaNs and infinities are excluded (4 corresponds to infinities; 2 + 4 = 6) -fimf-domain-exclusion=7:exp2f <- NaNs, infinities, and extremes are excluded (1 corresponds to extremes; 2 + 4 + 1 = 7) -fimf-domain-exclusion=15:exp2f <- NaNs, infinities, extremes, and subnormals are excluded (8 corresponds to subnormals; 2 + 4 + 1 + 8=15)
If the vfixupnanps instruction is included, the sequence correctly processes any arguments including NaN values. For example, the following options generate the 4-instruction sequence:
-fimf-domain-exclusion=1:exp2f <- only extremes are excluded (1 corresponds to extremes) -fimf-domain-exclusion=4:exp2f <- only infinities are excluded (4 corresponds to infinities) -fimf-domain-exclusion=8:exp2f <- only subnormals are excluded (8 corresponds to subnormals) -fimf-domain-exclusion=13:exp2f <- only extremes, infinities and subnormals are excluded (1 + 4 + 8 = 13)