英特尔 AVX 内在函数:有兼容库吗?

发布于 2024-08-30 01:12:34 字数 170 浏览 3 评论 0原文

有 Intel AVX 内在函数库吗?我正在寻找类似于“sse2mmx.h”标头的内容,如果 SSE2 整数内在函数在编译时不可用,则该标头会回退到 MMX 内在函数。因此,如果我有类似的 AVX 库,我可以为新硬件编写优化的代码,在 AVX 扩展不可用的情况下,该代码将具有几乎最佳的速度。谷歌搜索到目前为止没有多大帮助:(

Are there any Intel AVX intrinsics library out? I'm looking for something similar as 'sse2mmx.h' header which fall-backs to MMX intrinsics if SSE2 integer intrinsics are not available on compile time. Thus if I had similar library for AVX I could write optimized code for new hardware which would have almost optimal speed in case AVX extension isn't available. Googling didn't help much so far :(

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

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

发布评论

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

评论(1

橙幽之幻 2024-09-06 01:12:34

Intel 提供了 AVX 仿真标头。我还没有尝试过,但引用链接的文章“AVX 模拟头文件使用之前的 Intel 指令集扩展的内在函数,最高可达 Intel SSE4.2。开发环境和硬件中需要 SSE4.2 支持,以便要使用 AVX 仿真头文件,只需包含此文件:#include "avxintrin_emu.h" 而不是通常的 #include" -听起来这就是你要找的。

英特尔还有一个模拟器,名为 SDE,它可能有用。我还没有使用它来测试 AVX 代码,但它在我的机器上运行良好,可以在较旧的 CPU 上使用 AES-NI 指令集测试代码,而且我知道它也支持 AVX 模拟。 SDE 对于检查 CPUID 处理代码特别有用。

Intel provides a AVX emulation header. I haven't tried it, but quoting the linked article "The AVX emulation header file uses intrinsics for the prior Intel instruction set extensions up to Intel SSE4.2. SSE4.2 support in your development environment as well as hardware is required in order to use the AVX emulation header file. To use simply have this file included: #include "avxintrin_emu.h" nstead of usual #include <immintrin.h>" - sounds like this is what you're looking for.

Intel also has an emulator, called SDE, which might be useful. I haven't used it for testing AVX code yet, but it worked fine on my machine for testing code using the AES-NI instruction sets on an older CPU, and I know it supports AVX emulation as well. SDE is especially useful for checking your CPUID handling code.

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