Developer Guide and Reference

Contents

Packed Integer Min/Max Intrinsics

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