如何使用SSE打印矢量的元素?
我设置了__m128向量并尝试打印元素
#include <immintrin.h>
#include <iostream>
int main(){
int control;
__m128 vector = _mm_set_ps(1.0,1.0,1.0,1.0);
std::cout << vector.m128_f32[1];
//std::cin >> control;
return 0;
}
编译器指责:
error: request for member ‘m128_f32’ in ‘vector’, which is of non-class type ‘__m128 {aka __vector(4) float}
什么是正确的方法?