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
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

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804