The data-parallel types library has four special algorithms for SIMD vectors. The four special algorithms are min, max, minmax, and clamp. min, max, and minmax The two algorithms min and max have in common that they each accept two SIMD vectors and return a SIMD vector. This contains the element-wise minimum or maximum of the […]| MC++ BLOG
In this article, I will discuss reduction and mask reduction for data-parallel types. Reduction A reduction reduces the SIMD vector to a single element. The library provides three functions for this purpose: reduce, hmin, and hmax.The following program shows how these functions are used. // reduction.cpp #include <array> #include <experimental/simd> #include <functional> #include <iostream> #include […]| MC++ BLOG
Thanks to simd_mask, conditional execution of operations on data-parallel types is possible. Unfortunately, in my last article, Data-Parallel Types – A First Example, I forgot to introduce one of the new library functions. I will make up for that in this article. Where Expression The new keyword where creates a so-called where expression. This allows […]| MC++ BLOG
After providing a theoretical introduction to the new C++ 26 feature in my last article, “Data-Parallel Types (SIMD),” I would like to follow up today with a practical example.| MC++ BLOG