_mm_mul_epu32 和 _mm_mullo_epi32 在arm neon上

发布于 2025-01-18 07:00:14 字数 128 浏览 4 评论 0原文

我正在研究向NEON的端口SSE代码的申请。

我看到了内在的_mm_mullo_epi32_mm_mul_epu32在SSE中。

我们有等效的霓虹灯吗?

I am working on a application to port SSE code to Neon.

I see the intrinsics _mm_mullo_epi32 and _mm_mul_epu32 in SSE.

Do we have an equivalent of Neon for these ?

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

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

发布评论

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

评论(1

染柒℉ 2025-01-25 07:00:14

_mm_mullo_epi32 等效的是 vmulq_s32

_mm_mul_epu32 有点棘手,没有单个 NEON 指令可以完成这项工作。
不过,解决方法并没有那么糟糕,只需要 3 条指令。两条 vmovn_u64 指令用于丢弃参数的每个第 2 个通道,然后是 vmull_u32 将 32 位通道乘以 64 位通道。

The equivalent of _mm_mullo_epi32 is vmulq_s32

_mm_mul_epu32 is a bit tricky, no single NEON instruction does the job.
Still, the workaround is not that bad, only needs 3 instructions. Two vmovn_u64 instructions to discard every 2-nd lane of the arguments, followed by vmull_u32 to multiply 32-bit lanes into 64-bit ones.

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