C++17: Parallel Algorithms of the Standard Template Library
With C++17, concurrency in C++ has drastically changed, in particular the parallel algorithms of the Standard Template Library (STL). C++11 and C++14 only provide the basic building blocks for concurrency. These tools are suitable for a library or framework developer but not for the application developer. Multithreading in C++11 and C++14 becomes an assembly language for concurrency in C++17!
Execution Policy
With C++17, most of the STL algorithms are available in a parallel implementation. This makes it possible for you to invoke an algorithm with a so-called execution policy. This policy specifies whether the algorithm runs sequentially (std::execution::seq
), in parallel (std::execution::par
), or in parallel with additional vectorisation (std::execution::par_unseq
).
New Algorithms
In addition to the 69 algorithms that are available in overloaded versions for parallel, or...