Cartesius00
Cartesius00

Reputation: 24364

SIMD (AVX) compare

What is the name of gcc's intrinsic for comparing __m256 and __m256i (AVX instruction set)?

Upvotes: 7

Views: 8672

Answers (1)

Joel Falcou
Joel Falcou

Reputation: 6357

As said in the Intel AVX documentation

_mm256_cmp_ps, _mm256_cmp_pd 

etc

Note that instead of having multiple comparison instructions, you have to pass an enum indicating the comparison done. E.g :

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

Upvotes: 9

Related Questions