This section describes the C++ language-level features supporting the Intel® Streaming SIMD Extensions 2 (SSE2) in the Intel® C++ Compiler. The features are divided into two categories:
Floating-Point Intrinsics -- describes the arithmetic, logical, compare, conversion, memory, and initialization intrinsics for the double-precision floating-point data type (__m128d).
Integer Intrinsics -- describes the arithmetic, logical, compare, conversion, memory, and initialization intrinsics for the extended-precision integer data type (__m128i).
There are no intrinsics for floating-point move operations. To move data from one register to another, a simple assignment, A = B, suffices, where A and B are the source and target registers for the move operation.
On processors that do not support SSE2 instructions but do support MMX Technology, you can use the sse2mmx.h emulation pack to enable support for SSE2 instructions. You can use the sse2mmx.h header file for the following processors:
Some intrinsics are "composites" because they require more than one instruction to implement them. Intrinsics that require one instruction to implement them are referred to as "simple".
You should be familiar with the hardware features provided by the SSE2 when writing programs with the intrinsics. The following are three important issues to keep in mind:
Certain intrinsics, such as _mm_loadr_pd and _mm_cmpgt_sd, are not directly supported by the instruction set. While these intrinsics are convenient programming aids, be mindful of their implementation cost.
Data loaded or stored as __m128d objects must be generally 16-byte-aligned.
Some intrinsics require that their argument be immediates, that is, constant integers (literals), due to the nature of the instruction.
The prototypes for SSE2 intrinsics are in the emmintrin.h header file.
You can also use the single ia32intrin.h header file for any IA-32 architecture-based intrinsics.