Intel® Streaming SIMD Extensions 2 (Intel® SSE2) intrinsics for integer set operations are listed in this topic. These intrinsics are composite intrinsics because they require more than one instruction to implement them. The prototypes for Intel® SSE2 intrinsics are in the emmintrin.h header file.

To use these intrinsics, include the immintrin.h file as follows:

#include <immintrin.h>

The results of each intrinsic operation are placed in registers. The information about what is placed in each register appears in the tables below, in the detailed explanation of each intrinsic. R, R0, R1...R15 represent the registers in which results are placed.

Intrinsic Name

Operation

Corresponding
Intel® SSE2 Instruction

_mm_set_epi64

Set two integer values

Composite

_mm_set_epi64x

Set two integer values

Composite

_mm_set_epi32

Set four integer values

Composite

_mm_set_epi16

Set eight integer values

Composite

_mm_set_epi8

Set sixteen integer values

Composite

_mm_set1_epi64

Set two integer values

Composite

_mm_set1_epi64x

Set two integer values

Composite

_mm_set1_epi32

Set four integer values

Composite

_mm_set1_epi16

Set eight integer values

Composite

_mm_set1_epi8

Set sixteen integer values

Composite

_mm_setr_epi64

Set two integer values in reverse order

Composite

_mm_setr_epi32

Set four integer values in reverse order

Composite

_mm_setr_epi16

Set eight integer values in reverse order

Composite

_mm_setr_epi8

Set sixteen integer values in reverse order

Composite

_mm_setzero_si128

Set to zero

Composite

_mm_set_epi64

__m128i _mm_set_epi64(__m64 q1, __m64 q0);

Sets the two 64-bit integer values.

R0

R1

q0

q1

_mm_set_epi64x

__m128i _mm_set_epi64x(__int64 b, __int64 a);

Sets the two 64-bit integer values.

R0

R1

a

b

_mm_set_epi32

__m128i _mm_set_epi32(int i3, int i2, int i1, int i0);

Sets the four signed 32-bit integer values.

R0

R1

R2

R3

i0

i1

i2

i3

_mm_set_epi16

__m128i _mm_set_epi16(short w7, short w6, short w5, short w4, short w3, short w2, short w1, short w0);

Sets the eight signed 16-bit integer values.

R0

R1

...

R7

w0

w1

...

w7

_mm_set_epi8

__m128i _mm_set_epi8(char b15, char b14, char b13, char b12, char b11, char b10, char b9, char b8, char b7, char b6, char b5, char b4, char b3, char b2, char b1, char b0);

Sets the 16 signed 8-bit integer values.

R0

R1

...

R15

b0

b1

...

b15

_mm_set1_epi64

__m128i _mm_set1_epi64(__m64 q);

Sets the two 64-bit integer values to q.

R0

R1

q

q

_mm_set1_epi64x

__m128i _mm_set1_epi64x(__int64 a);

Sets the two 64-bit integer values to a.

R0

R1

a

a

_mm_set1_epi32

__m128i _mm_set1_epi32(int i);

Sets the four signed 32-bit integer values to i.

R0

R1

R2

R3

i

i

i

i

_mm_set1_epi16

__m128i _mm_set1_epi16(short w);

Sets the eight signed 16-bit integer values to w.

R0

R1

...

R7

w

w

w

w

_mm_set1_epi8

__m128i _mm_set1_epi8(char b);

Sets the 16 signed 8-bit integer values to b.

R0

R1

...

R15

b

b

b

b

_mm_setr_epi64

__m128i _mm_setr_epi64(__m64 q0, __m64 q1);

Sets the two 64-bit integer values in reverse order.

R0

R1

q0

q1

_mm_setr_epi32

__m128i _mm_setr_epi32(int i0, int i1, int i2, int i3);

Sets the four signed 32-bit integer values in reverse order.

R0

R1

R2

R3

i0

i1

i2

i3

_mm_setr_epi16

__m128i _mm_setr_epi16(short w0, short w1, short w2, short w3, short w4, short w5, short w6, short w7);

Sets the eight signed 16-bit integer values in reverse order.

R0

R1

...

R7

w0

w1

...

w7

_mm_setr_epi8

__m128i _mm_setr_epi8(char b0, char b1, char b2, char b3, char b4, char b5, char b6, char b7, char b8, char b9, char b10, char b11, char b12, char b13, char b14, char b15);

Sets the 16 signed 8-bit integer values in reverse order.

R0

R1

...

R15

b0

b1

...

b15

_mm_setzero_si128

__m128i _mm_setzero_si128();

Sets the 128-bit value to zero.

R

0x0

Para obtener información más completa sobre las optimizaciones del compilador, consulte nuestro Aviso de optimización.