AVX除以__M256I将32位整数挤满了两个(无AVX2)
我正在寻找最快的方法,将包装的32位整数的__ M256i
除以两个(又称一个换档)使用AVX。我无法访问AVX2。 据我所知,我的选择是:
如果我需要下去SSE2,我会感谢最佳的SSE2实施。 如果是2),我想知道要使用的内在信息,以及是否有更优化的实现来专门除以2。 谢谢!
I'm looking for the fastest way to divide an __m256i
of packed 32-bit integers by two (aka shift right by one) using AVX. I don't have access to AVX2.
As far as I know, my options are:
- Drop down to SSE2
- Something like AVX __m256i integer division for signed 32-bit elements
In case I need to go down to SSE2 I'd appreciate the best SSE2 implementation.
In case it's 2), I'd like to know the intrinsics to use and also if there's a more optimized implementation for specifically dividing by 2.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
假设您知道自己在做什么,这就是该功能。
但是,这样做不一定比处理16个字节向量更快。在大多数CPU上,除了AMD ZEN 1 CPU外,这些插入/提取说明的性能并不是很棒。
Assuming you know what you’re doing, here’s that function.
However, doing that is not necessarily faster than dealing with 16-byte vectors. On most CPUs, the performance of these insert/extract instructions ain’t great, except maybe AMD Zen 1 CPU.