_mm_mul_epu32 和 _mm_mullo_epi32 在arm neon上
我正在研究向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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
与
_mm_mullo_epi32
等效的是vmulq_s32
_mm_mul_epu32
有点棘手,没有单个 NEON 指令可以完成这项工作。不过,解决方法并没有那么糟糕,只需要 3 条指令。两条
vmovn_u64
指令用于丢弃参数的每个第 2 个通道,然后是vmull_u32
将 32 位通道乘以 64 位通道。The equivalent of
_mm_mullo_epi32
isvmulq_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 byvmull_u32
to multiply 32-bit lanes into 64-bit ones.