These Intel® Streaming SIMD Extensions 4 (Intel® SSE4) intrinsics compare packed integers in the destination operand and the source operand, and return the minimum or maximum for each packed operand in the destination operand. The prototypes for these intrinsics are in the smmintrin.h file.

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

#include <immintrin.h>

Intrinsic Syntax

Operation

Corresponding
Intel® SSE4 Instruction

__m128i _mm_max_epi8( __m128i a, __m128i b)

Calculates maximum of signed packed integer bytes

PMAXSB

__m128i _mm_max_epi32( __m128i a, __m128i b)

Calculates maximum of signed packed integer doublewords

PMAXSD

__m128i _mm_max_epu32( __m128i a, __m128i b)

Calculates maximum of unsigned packed integer doublewords

PMAXUD

__m128i _mm_max_epu16( __m128i a, __m128i b)

Calculates maximum of unsigned packed integer words

PMAXUW

__m128i _mm_min_epi8( __m128i a, __m128i b)

Calculates minimum of signed packed integer bytes

PMINSB

__m128i _mm_min_epi32( __m128i a, __m128i b)

Calculates minimum of signed packed integer doublewords

PMINSD

__m128i _mm_min_epu32( __m128i a, __m128i b)

Calculates minimum of unsigned packed integer double words

PMINUD

__m128i _mm_min_epu16( __m128i a, __m128i b)

Calculates minimum of unsigned packed integer words

PMINUW

Для получения подробной информации о возможностях оптимизации компилятора обратитесь к нашему Уведомлению об оптимизации.