Skip to content
Evan Nemerson edited this page Jul 17, 2020 · 12 revisions

There are several other projects that occupy a similar space. This page is intended to provide a brief comparison between SIMDe and the alternatives. If you are aware of any other similar projects please add them; we'd love to take a look, maybe we can steal some ideas for SIMDe :)

Implementing one API with another

  • Implements: ARM, Intel
  • Language: C++
  • License: Apache 2.0

Iris is the only other project I'm aware of which is attempting to create portable implementations like SIMDe. SIMDe is much further along on the Intel side, but Iris looks to be in better shape on ARM, at least for now.

It's C++-only, Apache 2.0 license. AFAICT there are no accelerated fallbacks, nor is there a good way to add them since it relies extensively on templates. It's easy to add new portable implementations (much more so than in SIMDe), though.

  • Implements: NEON
  • Language: C
  • License: Apache 2.0

Written by an Intel employee to implement NEON using SSE up to 4.2. No fallbacks, so depending on what functions you use it requires up to SSE 4.2.

  • Implements: SSE
  • Language: C
  • License: MIT

The implementations from this project were merged into SIMDe pretty early. There are also a number of forks; DLTcollab/sse2neon seems to be the most advanced and is actively maintained.

Abstraction Layers

There are lots of projects which aim to create an abstraction layer which can be ported to different architectures.

This approach can work well, but doesn't always. The benefits and drawbacks are roughly the same as with the SIMDe approach, it's just they create their own functions instead of using an existing API as the abstraction layer. This means they can iron out some oddities in the API, but code has to be rewritten to target the new API, and there is always a bit of a mismatch between the API and the platform.

Using an abstraction layer in SIMDe is something currently under consideration. We would still be able to provide implementations directly in the APIs we're implementing so a lowest-common-denominator API wouldn't be a problem, and it would help us keep some logic centralized and make it easier to add new code. We'll probably end up creating something designed specifically for SIMDe, but hopefully other projects can provide some ideas, too.

Language: C++ License: Apache 2.0

Highway does dynamic dispatch, which is interesting but there will be a performance hit. OTOH, it makes it easier to implement dynamic dispatch since users don't have to do anything special.

It's also width-agnostic, which is very nice.

Language : C++ License: 3-clause BSD

This seems to be private to OpenCV, but you should be able to rip it out and plug it into another codebase without too much effort.

It's obviously targeted at computer vision, so there may be some holes in the API if you want to use it for other purposes, but it seems pretty well designed. If you already depend on OpenCV it's definitely worth taking a look.

This as an effort to develop a standard interface to SIMD functions for C++. AFAICT it relies pretty heavily on auto-vectorization, and the idea is that you basically annotate your code with std::experimental::simd stuff to help the compiler.

It actually seems pretty cool, but limited. If you want to try it now, see VcDevel/std-simd.

Clone this wiki locally