SIMD in C++20:
EVE of a New Era
Joel Falcou & Denis Yaroshevskiy
1001 Flavors of SIMD
- x86
- 128 bits: SSE2, SSE3, SSSE3, SSE4.1, SSE4.2
- 256 bits: AVX, AVX2, XOP
- 512 bits: AVX512 and its myriad of sub-genre
- ARM
- PowerPC
- 128 bits: Altivec on Power7-9
- 256 bits: Blue Gene Q QPX
What exists out there?
- Compiler's autovectorization
- Pragmas/special compilers
- std::execution::unseq, hpx
- Specialized tools: Halide, simdjson
- write by hand
EVE - Expressive Velocity Engine
- C++ 20 wrapper around SIMD intrinsincs
- Library of core types
- Algorithms
- 250+ numerical functions
- Supports all x86 flavors and AARCH64
- MIT license
Supported compilers/standards
- C++20
- Clang/GCC
- latest until modules
- msvc-clang/msvc latest soon~ish
EVE internal implementation
Algorithms available
- all_of/any_of/none_of
- find/find_if/find_if_not
- equal/mismatch
- transform_inplace/transform_to
- reduce
- inclusive_scan_inplace/inclusive_scan_to
- remove/remove_if (*)
Mismatch interface
auto std::mismatch(I1 f1, I1 l1, I2 f2, P p) -> std::pair
auto mismatch(R1&& r1, R2&& r2, P p) -> zip_iterator
requires zip_to_range<R1, R2>
auto mismatch(zipped_range_pair auto&& r, P p) -> zip_iterator
inclusive_scan complex numbers
Back to inclusive_scan complex numbers
Recommended workflow
- focus on the critical components
- build a standalone library
- dynamic linking
- contact us
Mentions
- Jean-Thierry Lapresté
- Stack Overflow: @aqrit, @Peter Cordes, @Z boson, @Stephen Canon
- Unity for soa_vector idea