Intel® C++ Compiler 16.0 User and Reference Guide

MMX™ Technology Compare Intrinsics

The prototypes for MMX™ technology compare intrinsics are in the mmintrin.h header file.

Intrinsic
Name

Operation

Corresponding
MMX™ Instruction

_mm_cmpeq_pi8

Equal

PCMPEQB

_mm_cmpeq_pi16

Equal

PCMPEQW

_mm_cmpeq_pi32

Equal

PCMPEQD

_mm_cmpgt_pi8

Greater Than

PCMPGTB

_mm_cmpgt_pi16

Greater Than

PCMPGTW

_mm_cmpgt_pi32

Greater Than

PCMPGTD

_mm_ cmpeq_pi8

__m64 _mm_ cmpeq_pi8(__m64 m1, __m64 m2);

Sets the corresponding 8-bit resulting values to all ones if the 8-bit values in m1 are equal to the corresponding 8-bit values in m2; otherwise sets them to all zeros.

_mm_ cmpeq_pi16

__m64 _mm_ cmpeq_pi16(__m64 m1, __m64 m2);

Sets the corresponding 16-bit resulting values to all ones if the 16-bit values in m1 are equal to the corresponding 16-bit values in m2; otherwise set them to all zeros.

_mm_ cmpeq_pi32

__m64 _mm_ cmpeq_pi32(__m64 m1, __m64 m2);

Sets the corresponding 32-bit resulting values to all ones if the 32-bit values in m1 are equal to the corresponding 32-bit values in m2; otherwise set them to all zeros.

_mm_ cmpgt_pi8

__m64 _mm_ cmpgt_pi8(__m64 m1, __m64 m2);

Sets the corresponding 8-bit resulting values to all ones if the 8-bit signed values in m1 are greater than the corresponding 8-bit signed values in m2; otherwise set them to all zeros.

_mm_ cmpgt_pi16

__m64 _mm_ cmpgt_pi16(__m64 m1, __m64 m2);

Sets the corresponding 16-bit resulting values to all ones if the 16-bit signed values in m1 are greater than the corresponding 16-bit signed values in m2; otherwise set them to all zeros.

_mm_ cmpgt_pi32

__m64 _mm_ cmpgt_pi32(__m64 m1, __m64 m2);

Sets the corresponding 32-bit resulting values to all ones, if the 32-bit signed values in m1 are greater than the corresponding 32-bit signed values in m2; otherwise set them all to zeros.