The prototypes for MMX™ technology intrinsics are in the mmintrin.h header file.
The intrinsics in the following table perform compare operations. For a more detailed description of an intrinsic, click on that intrinsic in the table.
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 |
__m64 _mm_cmpeq_pi8(__m64 m1, __m64 m2)
If the respective 8-bit values in m1 are equal to the respective 8-bit values in m2 set the respective 8-bit resulting values to all ones, otherwise set them to all zeros.
__m64 _mm_cmpeq_pi16(__m64 m1, __m64 m2)
If the respective 16-bit values in m1 are equal to the respective 16-bit values in m2 set the respective 16-bit resulting values to all ones, otherwise set them to all zeros.
__m64 _mm_cmpeq_pi32(__m64 m1, __m64 m2)
If the respective 32-bit values in m1 are equal to the respective 32-bit values in m2 set the respective 32-bit resulting values to all ones, otherwise set them to all zeros.
__m64 _mm_cmpgt_pi8(__m64 m1, __m64 m2)
If the respective 8-bit signed values in m1 are greater than the respective 8-bit signed values in m2 set the respective 8-bit resulting values to all ones, otherwise set them to all zeros.
__m64 _mm_cmpgt_pi16(__m64 m1, __m64 m2)
If the respective 16-bit signed values in m1 are greater than the respective 16-bit signed values in m2 set the respective 16-bit resulting values to all ones, otherwise set them to all zeros.
__m64 _mm_cmpgt_pi32(__m64 m1, __m64 m2)
If the respective 32-bit signed values in m1 are greater than the respective 32-bit signed values in m2 set the respective 32-bit resulting values to all ones, otherwise set them all to zeros.