News
C++20 concepts are coming to NSIMD. Stay tuned for our next release.
October 15 2020

C++20 brings a lot of new features including concepts. These allow you to define constraints on template parameters of classes and functions. This feature, designed by Bjarne Strouptroup from the very beginning of C++, allows, among other things, better diagnostics by C++ compilers as well as a better selection among overloads and specializations of template classes and functions. NSIMD is a vectorization library for abstracting SIMD programming. It has been designed to exploit the maximum power of processors at a low development cost.

The next version of NSIMD will offer a new C++20 API using concepts. This new API will be added to the APIs already proposed by NSIMD. It will bring concepts for constraining, among others, the types of scalar integers and floating point numbers as well as the types representing SIMD vectors. Other concepts will also be provided. The main goal is to take advantage of better diagnostic messages that compilers will be able to emit in order to further increase developers' productivity.

The code is already written. Find it on github, download and test it! The code is currently in beta version. The remaining tests and bug fixes will be done in the next few weeks before the release of NSIMD version 2. The support of C++20 compilers is not finalized, so you will need to use the latest versions of GCC or Clang for example. Check the support by your compiler on cppreference. Other features offered by C++20 are of great interest such as modules. However their support by compilers is not mature enough for NSIMD. But as soon as the situation will have evolved they will also be part of the game!

[1] C++20 concepts : https://en.cppreference.com/w/cpp/language/constraints
[2] Link to NSIMD : https://github.com/agenium-scale/nsimd/tree/spmd
[3] Compilers support for C++20 : https://en.cppreference.com/w/cpp/compiler_support/20