Comparison of SIMD (AVX)

What is gcc called for comparing __m256 and __m256i (AVX instruction set)?

+6
source share
1 answer

As said in Intel AVX documentation

 _mm256_cmp_ps, _mm256_cmp_pd 

etc.

Please note that instead of having several comparison instructions, you need to pass an enumeration indicating the comparison. For instance:

 res = _mm256_cmp_ps(a,b, _CMP_LT_OQ); // AVX res = a < b 
+6
source

Source: https://habr.com/ru/post/908741/


All Articles