Visible to Intel only — GUID: GUID-F0EF252F-4DC3-4780-B42C-74BDF77384D9
Visible to Intel only — GUID: GUID-F0EF252F-4DC3-4780-B42C-74BDF77384D9
fimf-use-svml, Qimf-use-svml
Instructs the compiler to use the Short Vector Math Library (SVML) rather than the Intel® C++ Compiler Classic Math Library (LIBM) to implement math library functions.
Syntax
Linux: |
-fimf-use-svml=value[:funclist] |
macOS: |
-fimf-use-svml=value[:funclist] |
Windows: |
/Qimf-use-svml:value[:funclist] |
Arguments
funclist |
Is an optional list of one or more math library functions to which the attribute should be applied. 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-use-svmlt=true:sin,sinf (or /Qimf-use-svml:true:sin,sinf) to specify that both the single-precision and double-precision sine functions should use SVML. |
Default
false |
Math library functions are implemented using the Intel® C++ Compiler Classic Math Library, though other compiler options such as -fast-transcendentals or /Qfast-transcendentals may give the compiler the flexibility to implement math library functions with either LIBM or SVML. |
Description
This option instructs the compiler to implement math library functions using the Short Vector Math Library (SVML). When you specify -fimf-use-svml=true or /Qimf-use-svml:true, the specific SVML variant chosen is influenced by other compiler options such as -fimf-precision (Linux* and macOS) or /Qimf-precision (Windows*) and -fp-model (Linux and macOS) or /fp (Windows). This option has no effect on math library functions that are implemented in LIBM but not in SVML.
In value-safe settings of option -fp-model (Linux and macOS) or option /fp (Windows) such as precise, this option causes a slight decrease in the accuracy of math library functions, because even the high accuracy SVML functions are slightly less accurate than the corresponding functions in LIBM. Additionally, the SVML functions might not accurately raise floating-point exceptions, do not maintain errno, and are designed to work correctly only in round-to-nearest-even rounding mode.
The benefit of using -fimf-use-svml=true or /Qimf-use-svml:true with value-safe settings of -fp-model (Linux and macOS) or /fp (Windows) is that it can significantly improve performance by enabling the compiler to efficiently vectorize loops containing calls to math library functions.
If you need to use SVML for a specific 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 :sqrtf, as in -fimf-use-svml=true:sin or /Qimf-use-svml:true:sin, or -fimf-use-svml =false:sqrtf or /Qimf-use-svml:false: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.
If you specify option -mia32 (Linux*) or option /arch:IA32 (Windows*), vector instructions cannot be used. Therefore, you cannot use Linux* option -mia32 with option -fimf-use-svml=true, and you cannot use Windows* option /arch:IA32 with option /Qimf-use-svml:true.
Since SVML functions may raise unexpected floating-point exceptions, be cautious about using features that enable trapping on floating-point exceptions. For example, be cautious about specifying option -fimf-use-svml=true with option -fp-trap, or option /Qimf-use-svml:true with option /Qfp-trap. For some inputs to some math library functions, such option combinations may cause your program to trap unexpectedly.
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