使用单精度浮点

发布于 2024-11-27 20:51:30 字数 518 浏览 4 评论 0原文

我想在我的 C++ 代码中引入一些 SSE 命令。比如这个:

http://msdn.microsoft .com/en-us/library/afh0zf75(v=VS.80).aspx

如果我理解正确的话,我必须将浮点精度设置为单精度才能使用此类命令。我说得对吗?

如果是这样,我该在哪里做呢?我使用 Visual Studio 2010 并检查:

项目->属性->c/c++->代码生成->浮点模型

选项有:

精确 (/fp:precise)

严格 (/fp:Strict )

Fast (/fp:Fast )

Fast=2 (/fp:Fast = 2)

最后一个选项之前的那个是我需要的吗?如果没有,我该怎么办?

谢谢!!!

I'd like to introduce some SSE commands to my C++ code. Such as this one:

http://msdn.microsoft.com/en-us/library/afh0zf75(v=VS.80).aspx

If I understand correctly, I have to set the floating point precision to single in order to use this kind of commands. Am I right?

If so, where do I do that? I work with visual studio 2010 and checked:

project->properties->c/c++->code generation->Floating point model

The options there are:

Precise (/fp:precise)

Strict (/fp:Strict )

Fast (/fp:Fast )

Fast=2 (/fp:Fast = 2)

Is the one before last option the one I need? If not, what should I do?

Thanks!!!

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

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

发布评论

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

评论(1

傲性难收 2024-12-04 20:51:30

不,你只是使用它。包含标题并使用说明。

No, you just use it. Include the header, and use the instruction.

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