Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2005
Visual Studio
Visual C++
Reference
Libraries Reference
Run-Time Library
 _set_SSE2_enable
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
Run-Time Library Reference 
_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
);

Parameters

flag

1 for enabling the SSE2 implementation. 0 for disabling the SSE2 implementation. By default, SSE2 implementation is enabled on processors that support it.

Nonzero if SSE2 implementation is enabled; zero if SSE2 implementation is disabled.

The following functions have SSE2 implementations that can be enabled with _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.

The SSE2 implementation is only used if all exceptions are masked. Use _control87, _controlfp to mask exceptions.

Routine Required header Compatibility

_set_SSE2_enable

<math.h>

ANSI, Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003

For more compatibility information, see Compatibility in the Introduction.

// crt_set_SSE2_enable.c
// processor: x86
#include <math.h>
#include <stdio.h>

int main()
{
   int i = _set_SSE2_enable(1);

   if (i)
      printf("SSE2 enabled.\n");
   else
      printf("SSE2 not enabled; processor does not support SSE2.\n");
}

Output

SSE2 enabled.

Not applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2010 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker