Mono.Simd Vector3(花车)失踪?
题
Heya,我正在尝试使用Mono的SIMD来处理项目中的坐标(X,Y,Z), 但我只看到对Vector2和Vector4类型的支持。有没有人遇到这个问题,有没有解决办法?
提前致谢。
解决方案
这与寄存器的工作方式有关。你可以使用Vector4f并将 W
部分设置为0或1(取决于你想用矢量做什么),一切都会好的。
http://tirania.org/blog/archive/2008/Nov -03.html 解释:
在x86处理器上有这些说明 使用新的注册银行(XMM 寄存器)并且可以配置为 使用a一次处理16个字节 可能的组合数量:
* byte-level operations on 16 elements. * short-level operations on 8 elements. * single precision or integer-level operations on 4 elements. * double precision or long-integer operations on 2 elements.
不隶属于 StackOverflow