【问题标题】:Mono.Simd Vector3 (floats) missing?Mono.Simd Vector3(浮点数)丢失?
【发布时间】:2010-12-10 07:21:13
【问题描述】:

嘿,我正在尝试使用 Mono 的 SIMD 来处理我的项目中的坐标(X,Y,Z), 但我只看到对 Vector2 和 Vector4 类型的支持。有没有人遇到过这种情况,有什么解决方法吗?

提前致谢。

【问题讨论】:

    标签: c# mono vector simd


    【解决方案1】:

    这与寄存器的工作方式有关。您可以只使用 Vector4f 并将 W 部分设置为 0 或 1(取决于您要对矢量做什么),一切都会好起来的。

    http://tirania.org/blog/archive/2008/Nov-03.html 解释:

    在 x86 处理器上,这些说明 使用新的寄存器库(XMM 寄存器),并且可以配置为 一次处理 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.
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-02-07
      • 1970-01-01
      • 1970-01-01
      • 2013-08-20
      • 2015-04-15
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多