float a[4] = {1,2,3,4}, b[4] = {4,3,2,1};
uint32_t c[4];
int main() {
__m128 pa = _mm_loadu_ps(a);
__m128 pb = _mm_loadu_ps(b);
__m128 pc = _mm_cmpgt_ps(pa, pb);
_mm_storeu_ps((float*)c, pc);
for (int i = 0;i < 4; ++i) printf("%u\n", c[i]);
return 0;
}
什么是正确的指令_mm_storeu_ps((float*)c, pc)
?在这里,c 是一个整数数组……我觉得这种方式不好,更好吗?