如何指导C++编译器自动使用SIMD说明?

发布于 2025-01-27 08:42:05 字数 183 浏览 3 评论 0原文

假设我有一个基于C ++标准的通用C ++代码。 该代码旨在在Windows 64位和Linux 64位上运行。

我们可以指示编译器自动使用内在吗?即我不想编写任何可用的说明。我想要的是编译器自动使用任何固有信息,如果适用于我的普通C ++代码。 如果可以的话,那么如何在Windows和Linux上的Visual Studio进行操作?

Let's say I have a generic c++ code based on c++ standard.
This code is meant to run on windows 64 bit and Linux 64 bit.

Can we direct the compiler to make use of intrinsics automatically? i.e. I don't want to write any instructions available. What I want is to compiler automatically use any intrinsics if available for my normal c++ code.
If this is possible, then how to do it for Visual studio in windows and on Linux?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文