_mm_cmpgt_psADD TO COMPARE ADDED TO COMPARE
Intel 64-bit (64 bits)/ SSE4.2
View official documentation
Purpose:
Purpose: Compare packed single-precision (32-bit) floating-point elements in a and b for greater-than, and store the results in output.
Result value:
Endian considerations: None.
Result:
__m128
Example:
#include <xmmintrin.h>
#include <stdio.h>
int main() {
__m128 a = _mm_set_ps(1.5, -2.5, 3.5, 4.5);
__m128 b = _mm_set_ps(1.0, -3.0, 2.0, 5.0);
__m128 result = _mm_cmpgt_ps(a, b);
float *res = (float*)&result;
for(int i = 0; i < 4; i++)
printf("%f ", res[i]);
return 0;
}
Prototypes
Assembly Instruction:
cmpps
Usage:
__m128 output =
_mm_cmpgt_ps(
__m128 a, __m128 b
)
DB statistics
SIMD Engines: | 5 |
C Intrinsics: | 10702 |
NEON: | 4232 |
AVX2: | 462 |
AVX512: | 4955 |
SSE4.2: | 652 |
VSX: | 401 |