_set_SSE2_enable
Enables or disables the use of Streaming SIMD Extensions 2 Instructions (SSE2) instructions in CRT math routines.
int _set_SSE2_enable( int flag );
The following functions have SSE2 implementations that can be enabled by using _set_SSE2_enable:
The SSE2 implementation might give slightly different answers from the default implementations of these functions, because SSE2 intermediate values are 64-bit floating-point quantities but the default implementation intermediate values are 80-bit floating-point quantities.
Note |
|---|
If you compile the project by using the /Oi (Generate Intrinsic Functions) compiler option, it may appear that _set_SSE2_enable has no effect. That is because the /Oi compiler option gives the compiler the authority to replace CRT calls with intrinsics. This behavior overrides turning off SSE2 intrinsics by using _set_SSE2_enable. If you want to guarantee that /Oi does not override the behavior of _set_SSE2_enable, compile your project with /Oi-. This may be necessary since other compiler switches can imply /Oi. |
The SSE2 implementation is only used if all exceptions are masked. Use _control87, _controlfp to mask exceptions.
Routine | Required header |
|---|---|
_set_SSE2_enable | <math.h> |
For more compatibility information, see Compatibility in the Introduction.
Not applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.
Note