Intel® C++ Compiler Classic Developer Guide and Reference

ID 767249
Date 3/31/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of 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