_mm256_cmpgt_epi8ADD TO COMPARE ADDED TO COMPARE
Intel 64-bit (64 bits)/ AVX2
View official documentation
View Félix Cloutier's documentation
Purpose:
Compare packed signed 8-bit integers in a and b for greater-than, and store the results in output.
Result:
__m256i
Example:
#include <immintrin.h>
#include <stdio.h>
int main() {
__m256i a = _mm256_set_epi8(1, -3, 50, 5, -10, 100, 30, 90, 40, 25, -60, 75, 15, 0, 10, -1, 1, -3, 50, 5, -10, 100, 30, 90, 40, 25, -60, 75, 15, 0, 10, -1);
__m256i b = _mm256_set_epi8(0, -3, 25, 10, -20, 80, 25, 90, 35, 30, -50, 60, 20, 5, 15, -5, 0, -3, 25, 10, -20, 80, 25, 90, 35, 30, -50, 60, 20, 5, 15, -5);
__m256i result = _mm256_cmpgt_epi8(a, b);
char *res = (char*)&result;
for(int i = 0; i < 32; i++)
printf("%d ", res[i]);
return 0;
}
Prototypes
Assembly Instruction:
vpcmpgtb
Usage:
__m256i result =
_mm256_cmpgt_epi8(
__m256i a, __m256i b
)
Performance Metrics:
📊 Unlock Performance Insights
Get access to detailed performance metrics including latency, throughput, and CPU-specific benchmarks for this intrinsic.
SIMD Intrinsics Summary
| SIMD Engines: | 6 |
| C Intrinsics: | 10444 |
| NEON: | 4353 |
| AVX2: | 405 |
| AVX512: | 4717 |
| SSE4.2: | 598 |
| VSX: | 192 |
| IBM-Z: | 179 |