Storing individual doubles from a packed double vector using Intel AVX

别说谁变了你拦得住时间么 提交于 2019-12-05 10:04:34
Mysticial

You can do it with a couple of extract instrinsics: (warning: untested)

 __m256d src = ...  //  data

__m128d a = _mm256_extractf128_pd(src, 0);
__m128d b = _mm256_extractf128_pd(src, 1);

_mm_storel_pd(dst + 0*dst_dist, a);
_mm_storeh_pd(dst + 1*dst_dist, a);
_mm_storel_pd(dst + 2*dst_dist, b);
_mm_storeh_pd(dst + 3*dst_dist, b);

What you want is the gather/scatter instructions in AVX2... But that's still a few years down the road.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!