C ++ SSE SIMD框架 [英] c++ SSE SIMD framework

查看:104
本文介绍了C ++ SSE SIMD框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道开源C ++ x86 SIMD内部函数库吗?

Does anyone know an open-source C++ x86 SIMD intrinsics library?

英特尔在其集成的性能基元库中提供了我所需要的,但是由于遍布各地的版权,我无法使用它.

Intel supplies exactly what I need in their integrated performance primitives library, but I can't use that because of the copyrights all over the place.

编辑

我已经知道编译器提供的内在函数.我需要一个方便的界面来使用它们.

I already know the intrinsics provided by the compilers. What I need is a convenient interface to use them.

推荐答案

看看 libsimdpp 仅标头的C ++ SIMD包装器图书馆.

Take a look at libsimdpp header-only C++ SIMD wrapper library.

该库通过单个接口支持多个指令集:SSE2,SSE3,SSSE3,SSE4.1,AVX,AVX2,AVX512F,XOP,FMA3/4,NEON,NEONv2,Altivec.支持Clang,GCC,MSVC和ICC.

The library supports several instruction sets via single interface: SSE2, SSE3, SSSE3, SSE4.1, AVX, AVX2, AVX512F, XOP, FMA3/4, NEON, NEONv2, Altivec. All of Clang, GCC, MSVC and ICC are suported.

通过将缺少的指令作为支持的指令的组合来实现,可以解决指令集之间的任何差异.另外,可以为多个指令集编译相同的代码,将生成的目标文件链接到单个可执行文件,并使用便捷的动态分配机制来运行最适合当前处理器的实现.

Any differences between instruction sets are resolved by implementing the missing instructions as a combination of supported ones. As a bonus, it's possible to compile the same code for several instruction sets, link the resulting object files to a single executable and use a convenient dynamic dispatch mechanism to run the implementation most tailored to the current processor.

这篇关于C ++ SSE SIMD框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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