开源项目推荐:关于cpu指令集simd二次封装的开源C++库

SIMD(Single Instruction Multiple Data ),顾名思义,就是单条指令处理多个数据。SIMD指令在本质上非常类似一个向量处理器,可对控制器上的一组数据(又称“数据向量”) 同时分别执行相同的操作从而实现空间上的并行。SIMD是CPU实现DLP(Data Level Parallelism)的关键,DLP就是按照SIMD模式完成计算的。SSE和较早的MMX和 AMD的3DNow!都是SIMD指令集。它可以通过单指令多数据技术和单时钟周期并行处理多个浮点来有效地提高浮点运算速度。

1、比较热门

C++ image processing and machine learning library with using of SIMD: SSE, AVX, AVX-512 for x86/x64, VMX(Altivec) and VSX(Power7) for PowerPC, NEON for ARM.
https://github.com/ermig1979/Simd
http://ermig1979.github.io/Simd/

#include <opencv2/core/core.hpp>
#define SIMD_OPENCV_ENABLE
#include "Simd/SimdLib.hpp"
cv::Point, cv::Size <--> Simd::Point
cv::Rect <--> Simd::Rectangle
cv::Mat <--> Simd::View

std::experimental::simd for GCC [ISO/IEC TS 19570:2018]
https://github.com/VcDevel/std-simd

SIMD Vector Classes for C++
https://github.com/VcDevel/Vc
https://web-docs.gsi.de/~mkretz/Vc-master/

MIPP is a portable wrapper for SIMD instructions written in C++11. It supports NEON, SSE, AVX and AVX-512.
https://github.com/aff3ct/MIPP

C++ wrappers for SIMD intrinsics and parallelized, optimized mathematical functions (SSE, AVX, NEON, AVX512)
https://github.com/xtensor-stack/xsimd
https://xsimd.readthedocs.io/en/latest/index.html

pillow

https://github.com/python-pillow/Pillow

pillow-simd

https://github.com/uploadcare/pillow-simd

2、相对冷门

Portable header-only C++ low level SIMD library
https://github.com/p12tic/libsimdpp

Agenium Scale vectorization library for CPUs and GPUs
https://github.com/agenium-scale/nsimd

UME::SIMD A library for explicit simd vectorization.
https://github.com/edanor/umesimd

3、封装再封装

The Mandelbrot fractal: sequential and SIMD implementations.
https://gitlab.inria.fr/acassagn/mandelbrot

VecCore is a simple abstraction layer on top of other vectorization libraries.
https://gitlab.cern.ch/VecGeom/VecCore

4、其他应用

Implementations of SIMD instruction sets for systems which don't natively support them.
https://github.com/simd-everywhere/simde

SIMD Library for Evaluating Elementary Functions, vectorized libm and DFT
https://github.com/shibatch/sleef

C++ SIMD Noise Library
https://github.com/Auburn/FastNoiseSIMD

5、SIMD教程

一文读懂SIMD指令集 目前最全SSE/AVX介绍_Axurq的博客-CSDN博客_simd指令集

C/C++指令集介绍以及优化(主要针对SSE优化)_LoveMIss-Y的博客-CSDN博客_指令集优化

SSE的学习_元气少女缘结神的博客-CSDN博客


---

Intel CPU指令集
https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html
《Modern Parallel Programming with C++ and Assembly Language: X86 SIMD Development Using AVX, AVX2, and AVX-512 1st ed. Edition》

《并行编程方法与优化实践》

《并行算法设计与性能优化》

猜你喜欢

转载自blog.csdn.net/libaineu2004/article/details/123556678
今日推荐