C++ 正在解析对成员的请求。。。它是非类类型的

C++ 正在解析对成员的请求。。。它是非类类型的,c++,visual-studio,mingw-w64,C++,Visual Studio,Mingw W64,我想知道为什么下面的代码在VisualStudio中编译,但在移植期间在Mingw GCC中出现编译错误。这是我第一次接触\uuu m128类型,但从这里的链接可以看出 You should not access the __m128 fields directly. You can, however, see these types in the debugger. A variable of type __m128 maps to the XMM[0-7] registers. 代码库非常

我想知道为什么下面的代码在VisualStudio中编译,但在移植期间在Mingw GCC中出现编译错误。这是我第一次接触
\uuu m128
类型,但从这里的链接可以看出

You should not access the __m128 fields directly. You can, however, see these types in the debugger. A variable of type __m128 maps to the XMM[0-7] registers.
代码库非常旧,此类型正在用作

Matrix m;
__m128  b0 = _mm_set_ps(b[0][0], b[1][0], b[2][0], 0);
__m128  b1 = _mm_set_ps(b[0][2], b[1][3], b[2][4], 0);

__m128  a00 = _mm_load1_ps(&a[0][0]);
__m128  a10 = _mm_load1_ps(&a[1][0]);
__m128  r1a = _mm_mul_ps(a00, b0);
__m128  r1b = _mm_mul_ps(a10, b1);
__m128  r1 = _mm_add_ps(r1a, r1b);

m[0][0] = r1.m128_f32[3];
我得到的错误是

 error: request for member 'm128_f32' in 'r1', which is of non-class type '__m128 {aka __vector(4) float}'
  m[0][0] = r1.m128_f32[3];
我试图查找这个错误,但是我相信它们不适用于我的案例,因为它们处理C++最麻烦的解析问题。
任何关于我如何解决这个问题的建议都将不胜感激。谢谢。

GCC不像VS那样对这些类型使用联合,这些类型作为内置类型处理。可以直接为a uu m128编制索引,请参见。 当然,这带来了一个可移植性问题。在我的项目中,我使用带有并集和重载运算符[]的包装类,但生成的代码是次优的