使用单精度浮点
我想在我的 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,你只是使用它。包含标题并使用说明。
No, you just use it. Include the header, and use the instruction.