英特尔AVX:为什么双精度浮点变量没有256位版本的点积? [英] Intel AVX : Why is there no 256-bits version of dot product for double precision floating point variables?

查看:181
本文介绍了英特尔AVX:为什么双精度浮点变量没有256位版本的点积?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

另一个问题中在SO 上,我们尝试(并成功)找到了替换AVX缺少的指令的方法:

  __m256d _mm256_dp_pd __m256d m1,__m256d m2,const int mask); 

任何人都知道这条指令丢失的原因?部分回答此处

$ b $这个和各种其他AVX限制的根本原因是,在体系结构上,AVX是并排的两个以上的SSE执行单元 - 你会注意到,实际上没有AVX指令水平跨越向量的两个128位二分之一的边界(在 vpalignr 的情况下尤其烦人)。一般来说,你有效地只是并行地获得两个128位SSE操作,这对于以元素方式操作的大多数指令是有用的,但是不如适当的256位SIMD实现有用。


In another question on SO we tried (and succeeded) to find a way to replace the AVX missing instruction:

 __m256d _mm256_dp_pd(__m256d m1, __m256d m2, const int mask);

Anyone knows the reason why this instruction is missing ? Partial answer here.

解决方案

The underlying reason for this and various other AVX limitations is that architecturally AVX is little more than two SSE execution units side by side - you will notice that virtually no AVX instructions operate horizontally across the boundary between the two 128 bit halves of a vector (which is particularly annoying in the case of vpalignr). In general you effectively just get two 128 bit SSE operations in parallel, which is useful for the majority of instructions which just operate in an element-wise fashion, but not as useful as a proper 256 bit SIMD implementation.

这篇关于英特尔AVX:为什么双精度浮点变量没有256位版本的点积?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆