【问题标题】:IOS 9, IPhone 6S plus, metal, unable to link to function frexpIOS 9, iPhone 6S plus, metal, 无法链接到功能 frexp
【发布时间】:2016-06-30 04:53:01
【问题描述】:

IOS metal 新手,我正在尝试编写内核。我的函数需要链接到 frexp 函数。不幸的是,我引用 frexp 函数的内核无法编译。

    float exponent = 0.0;
    float mantissa = frexp(value, exponent);

Metal 文档将函数协议列为: T frexp(T x, Ti &exp)

我能够编译成其他类似的数学函数,例如 exp、exp2、exp10、ldexp。

有没有人能链接到 Metal 的 frexp 函数?或者知道如何查看 metal_math 包含文件以查看编译器引用的 frexp 协议?

谢谢!

【问题讨论】:

    标签: ios iphone metal


    【解决方案1】:

    在阅读了我自己的问题后,我发现了我的错误,更正后的代码如下所示。

    int exponent = 0.0;
    float mantissa = frexp(value, exponent);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-05-31
      • 1970-01-01
      • 1970-01-01
      • 2017-10-26
      • 2017-11-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多