如何在X86体系结构上编译DSPSTONE的浮​​动计算?

发布于 2025-02-10 04:32:38 字数 189 浏览 2 评论 0原文

我想使用此基准测试来评估我在编译器中的优化。

我可以在x86体系结构上编译DSPSTONE的 int Computation ,而另一个则不能。

错误是主函数的类型是浮动。

我知道在X86体系结构中不允许使用它,因此我想知道是否还有其他方法可以在X86上进行编译。

谢谢!!

I want to use this benchmark to evaluate my optimization in compiler.

I can compile int computation of DSPStone on X86 architecture, but the other cannot.

The error is the type of main function is float.

I know it is not allowed in X86 architecture, so I want to know if there are other ways to compile it on X86.

Thanks!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

她如夕阳 2025-02-17 04:32:38

您只需创建一个浮点功能,然后使用主功能调用它。请阅读一些C教程。

我建议这样做: https://wwwww.tutorialspoint.com/cprogramming/cprogramming/cprogramming/index.htm

float computation(float f);

int main(int argc, char *argv[]) {
    float test = 3.14;
    test = computation(test);
    return 0;
}

float computation(float f) {
    f = f + f;
    return f;
}

You just create a float function and call it with your main function. Please read some C tutorials.

I suggest this one: https://www.tutorialspoint.com/cprogramming/index.htm

float computation(float f);

int main(int argc, char *argv[]) {
    float test = 3.14;
    test = computation(test);
    return 0;
}

float computation(float f) {
    f = f + f;
    return f;
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文