# Simd Library: a C++ SIMD image processing and machine learning library for x86 and ARM

> The Simd Library ships hand-optimised SSE, AVX, AVX-512, AMX, NEON, SVE and HVX kernels behind a plain C API, with C++ wrappers for detection and motion. It is a build-from-source library, not a drop-in OpenCV replacement.

**ermig1979/Simd** — C++ image processing and machine learning library with using of SIMD: SSE, AVX, AVX-512, AMX  for x86/x64, NEON, SVE for ARM, HVX for Hexagon

- Repository: https://github.com/ermig1979/Simd
- Website: http://ermig1979.github.io/Simd
- Stars: 2,270 · Forks: 456
- Language: C++
- License: MIT
- Published: 2026-09-10 · Updated: 2026-09-10 · Language: en
- Canonical page: https://hysenlabs.com/projects/ermig1979-simd

## What Simd Library is for, and who it is aimed at

Simd Library is an image processing and machine learning library written for C and C++ programmers. Its selling point is not the algorithm list but how those algorithms are implemented: each one is written against specific SIMD instruction sets, so the same pixel format conversion or convolution runs on SSE, AVX, AVX-512 and AMX on x86/x64, NEON, SVE and SVE2 on ARM, and HVX on Hexagon. The README names the categories it covers: pixel format conversion, image scaling and filtration, extraction of statistic information from images, motion detection, object detection and classification, and neural network.

The audience is narrow on purpose. This is for people who already know which operation is eating their frame time and want a kernel that uses the vector units they paid for. It is not a general computer vision framework. There is no camera capture layer, no GUI, no Python-first workflow as the primary interface. A Python wrapper exists under simd/py/SimdPy/, and the CMake option SIMD_PYTHON is switched on by default, but the README treats it as an add-on to a C++ library.

The licence is MIT, which is the permissive end of the spectrum and the reason a library like this can be dropped into commercial products without the copyleft questions that come with some vision stacks.

## How the SIMD dispatch and the C API fit together

The architecture visible in the repository is a flat C core with thin C++ on top. Everything lives under simd/src/Simd/, and the two entry points are Simd/SimdLib.h for C and Simd/SimdLib.hpp for C++. The C++ header is described as containing useful classes and functions to facilitate access to the C API, so it is a convenience layer rather than a separate implementation.

Two headers are called out for the higher-level features. Simd::Detection, the Haar and LBP cascade detector, needs Simd/SimdDetection.hpp. Simd::Motion, the motion detection namespace, needs Simd/SimdMotion.hpp. The cascades those detectors consume are shipped in simd/data/cascade/ as OpenCV HAAR and LBP files, which tells you the detector is compatible with the model format the OpenCV ecosystem already produces.

The dispatch story is the CMake flag SIMD_RUNTIME, switched on by default, which the README describes as enabling runtime faster algorithm choice. That is the mechanism that matters in deployment: you build once with several instruction sets compiled in, and the library picks a suitable path for the CPU it lands on. The build flags then decide which instruction sets exist in the binary at all. SIMD_AVX512 and SIMD_AVX512VNNI are on by default; SIMD_AMXBF16, SIMD_SVE and SIMD_SVE2 are off by default. That default set is a deliberate trade: AVX-512 code compiled in is code that has to be guarded at runtime, and AMX and SVE are opt-in because the toolchains and hardware are less common.

## Building Simd Library on Linux and Windows

The README gives CMake as the Linux path and Visual Studio 2022 project files as the Windows path. For a native Linux build on the current platform, the documented sequence is to create a build directory, point CMake at simd/prj/cmake with empty toolchain and target variables, and run make. The empty strings are how you tell it to use the native compiler rather than a cross toolchain.

```bash
mkdir build
cd build
cmake ../prj/cmake -DSIMD_TOOLCHAIN="" -DSIMD_TARGET=""
make
```

After this the README states that the library and the test application are built in the current directory. The test framework is on by default through SIMD_TEST, so a first build also gives you something to run. Build information is printed because SIMD_INFO is on by default.

Cross compilation uses the same script with explicit values. For 64-bit ARM the documented invocation is:

```bash
mkdir build
cd build
cmake ../prj/cmake -DSIMD_TOOLCHAIN="/your_toolchain/usr/bin/aarch64-linux-gnu-g++" -DSIMD_TARGET="aarch64" -DCMAKE_BUILD_TYPE="Release"
make
```

On Windows the project files in simd/prj/vs2022/ build a DLL by default, unlike every other case where the default is a static library. To get a static build you change the Configuration Type property of the Simd project and uncomment #define SIMD_STATIC in simd/src/Simd/SimdConfig.h. MinGW users can instead follow the CMake route with -G "MinGW Makefiles" and mingw32-make.

There is also a vcpkg port. The README shows the standard bootstrap and then ./vcpkg install simd, and notes that the port is kept up to date by Microsoft team members and community contributors, directing version complaints to the vcpkg repository. So the packaged route exists, but the README does not promise it tracks every release.

## A first real use: including the headers and enabling OpenCV conversion

The README is explicit about which header goes with which language. C code includes Simd/SimdLib.h; C++ code includes Simd/SimdLib.hpp. If you need Simd::Detection you add Simd/SimdDetection.hpp, and if you need Simd::Motion you add Simd/SimdMotion.hpp. Those four includes are the whole documented surface.

```cpp
#include "Simd/SimdLib.hpp"
#include "Simd/SimdDetection.hpp"
#include "Simd/SimdMotion.hpp"
```

One integration detail is easy to miss and is documented in a single sentence: mutual conversion between Simd and OpenCV types requires defining the macro SIMD_OPENCV_ENABLE before including the Simd headers. That ordering matters, because the macro has to be visible when the headers are preprocessed.

```cpp
#define SIMD_OPENCV_ENABLE
#include "Simd/SimdLib.hpp"
```

If you are evaluating the library rather than shipping it, the cheaper first step is the build itself. SIMD_TEST is on by default, so the test application is produced alongside the library in the build directory, and the README says the tests are built there. That gives you a way to confirm the kernels behave on your hardware before you write any integration code. The README does not walk through running the test binary or interpreting its output, so expect to inspect the build directory and the test sources under simd/src/Test/.

## Where Simd Library is the wrong tool

The most concrete limitation is packaging and ABI. The README's own Windows instructions say the default there is a DLL and everywhere else a static library, which means the linking model differs by platform unless you intervene. There is no documented stable ABI, no versioned symbol policy, and the release cadence is frequent: v7.2.163, v7.2.164 and v7.2.165 landed roughly a month apart through mid-2026. If you link dynamically and upgrade without rebuilding your own code, nothing in the documentation suggests that is safe.

Second, this is a source build. The vcpkg port is the only binary-ish route the README mentions, and it explicitly hands version currency to the vcpkg maintainers. Teams that cannot compile C++ in their pipeline, or that need a prebuilt artifact for an unusual target, are outside the documented path.

Third, the algorithm catalogue is deep in the categories listed but not broad. If your problem is camera calibration, stereo reconstruction, feature matching or a full DNN training stack, the README does not claim any of that. The neural network support is described as inference-oriented optimisation, with SIMD_SYNET enabling optimisations for the Synet framework and SIMD_INT8_DEBUG enabling debug INT8 capabilities for it. That is a specific integration, not a general model zoo.

Finally, the opt-in defaults cut both ways. SIMD_AMXBF16, SIMD_SVE and SIMD_SVE2 are off by default, so a build that works on your x86 workstation may silently lack the paths your ARM or AMX target needs until you pass those flags. The README documents the flags but does not warn about the failure mode.

## OpenCV as the alternative, and the real difference

OpenCV is the obvious comparison, and the README itself acknowledges the relationship by shipping OpenCV HAAR and LBP cascades in simd/data/cascade/ and by providing SIMD_OPENCV_ENABLE for type conversion. The difference in approach is what each project optimises for.

OpenCV is a framework: hundreds of algorithms, its own matrix type, video I/O, calibration, stitching, a large Python binding, and prebuilt packages for many platforms. Simd Library is a kernel collection behind a C API. It does not own your image type unless you adopt its structures, and it does not try to be the place where your whole pipeline lives. That narrowness is the point. When you already have a pipeline and one stage is slow, a library whose stated purpose is high performance algorithms for a defined list of operations is a smaller thing to integrate than a framework with its own data model.

The cost of that narrowness is everything OpenCV gives you for free. If you need to read a video file, calibrate a camera, or run a pretrained model without writing the inference glue, Simd Library does not replace OpenCV, and the README does not suggest it does. The SIMD_OPENCV_ENABLE macro is best read as an admission that the two are meant to coexist: you convert between the types and use each where it fits.

The other axis is instruction set coverage. The README lists AMX, AVX-512, SVE, SVE2 and HVX as supported extensions, with AMX-BF16, AMX-INT8 and AVX-512-BF16 grouped under SIMD_AMXBF16. A project that needs Hexagon HVX or SVE2 specifically has a short list of options, and this is on it.

## Maintenance, licence and upgrade cost

The repository is not archived, and the last push was on 2026-09-10, with the most recent release v7.2.165 on 2026-09-02. Releases arrive at roughly monthly intervals, which means the upgrade cost is real but predictable. Nothing in the README describes a deprecation policy, a changelog process, or a compatibility guarantee between minor versions. Treat the version number as the contract: pin one, and rebuild when you move.

The build flag surface is where upgrade friction will show up. There are around twenty documented CMake options, including SIMD_AVX512, SIMD_AVX512VNNI, SIMD_AMXBF16, SIMD_SVE, SIMD_SVE2, SIMD_TEST, SIMD_INFO, SIMD_PERF, SIMD_SHARED, SIMD_GET_VERSION, SIMD_SYNET, SIMD_INT8_DEBUG, SIMD_HIDE, SIMD_RUNTIME, SIMD_TEST_FLAGS, SIMD_OPENCV, SIMD_INSTALL, SIMD_UNINSTALL and SIMD_PYTHON. Any of them can change meaning between releases, and a build script that passes a stale flag is a silent misconfiguration rather than an error. Keep the flag list in one place in your build system.

The licence is MIT. That permits use, modification and redistribution with the licence text preserved, and it imposes no source disclosure requirement on your own code. It also comes with no patent grant, which is a difference from Apache-2.0 and is worth knowing if your product depends on a specific codec or algorithm. This is a description of the licence, not legal advice; if patent exposure matters to you, that is a conversation with a lawyer, not a README.

SIMD_SHARED is off by default, so the default artifact is a static library outside Windows. That is the cheaper choice for upgrades, because it removes the ABI question entirely: you rebuild, you relink, you ship.

## Conclusion

Adopt Simd Library if you have a fixed set of pixel and tensor operations that must run on x86 and ARM without a heavyweight framework, and you are willing to build it yourself and pin a release. Do not adopt it if you need a stable ABI across upgrades, a packaged binary per platform, or a broad algorithm catalogue; OpenCV covers far more ground. Before committing, verify three things: that your target CPU extensions are enabled by the CMake flags you pass, that SIMD_SHARED matches how you link, and that the version in vcpkg is the one you actually want, since the README points users to the vcpkg repository for updates rather than promising the port tracks every release.

## FAQ

### Is SIMD still used?

Yes. Simd Library is built entirely around SIMD CPU extensions and its README lists SSE, AVX, AVX-512 and AMX for x86/x64, NEON, SVE and SVE2 for ARM, and HVX for Hexagon as supported. The repository was last pushed on 2026-09-10 and release v7.2.165 shipped on 2026-09-02.

### What is SIMD code?

SIMD code applies one instruction to several data elements at once, and Simd Library is a C and C++ library whose image processing and machine learning algorithms are written that way. The README names pixel format conversion, image scaling and filtration, motion detection, object detection and classification, and neural network among the covered operations.

### Is GPU a SIMD?

The Simd Library documentation does not discuss GPU execution models, so it does not answer this. What the README does specify is the CPU instruction sets the library targets: SSE, AVX, AVX-512 and AMX on x86/x64, NEON, SVE and SVE2 on ARM, and HVX on Hexagon.

### What are the disadvantages of SIMD?

The README does not list disadvantages, but its build options show the practical constraints. AMX-BF16, AMX-INT8, AVX-512-BF16, SVE and SVE2 paths are off by default and must be enabled with SIMD_AMXBF16, SIMD_SVE or SIMD_SVE2, and SIMD_RUNTIME exists to choose a faster algorithm at runtime because a single binary must cover different CPUs.

## Sources

- [ermig1979/Simd on GitHub](https://github.com/ermig1979/Simd)
- [License: MIT](https://github.com/ermig1979/Simd/blob/master/LICENSE)
- [Project website](http://ermig1979.github.io/Simd)
- [README](https://github.com/ermig1979/Simd/blob/master/README.md)
- [Releases](https://github.com/ermig1979/Simd/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/ermig1979-simd
