What Are The Parallelism Features That Come With C++ 17?
With the C++17 standard, the contents of the Parallelism Technical Specification are added to modern C++, and as a result, make their way into many C++ compilers and IDEs, such as the latest C++ Builder 12. This feature adds new overloads, taking an additional execution policy argument, to many algorithms, as well as entirely new algorithms. Three execution policies are supported, which respectively provide sequential, parallel, and vectorized execution. What is parallel programming (parallelism, parallel computing) ? Parallel computing (Parallel Programming, Parallelism, Parallelization) is a type of computation that applies many calculations or processes simultaneously. Parallel Programming is generally used to solve heavy calculation problems such as real-time analysis of multi-dimensional data, image processing, calculations on fluid mechanics, thermodynamics, and other engineering problems. Parallel Programming is a method that uses multiple computational resources, processors, or processing by groups of servers. Generally, in this type of programming, it takes a problem, breaks it down into a series of smaller steps, delivers instructions, and processors execute the solutions of each part at the same time in different Threads, CPU Cores, CPUs, GPUs. There are many ways to use parallel programming methods and skills, here is an example, What is the development history of parallelism in C++? We can classify the parallel computation level by the level of the hardware technology that supports parallel computation technologies. This depends on your CPU, GPU, Hardware (board, rams, chipsets, …) and Networking technologies (Connection protocols, fibers, WiFi, 5G, etc.) . In other words, this is mostly depends to the distance between computational nodes and its architecture. In the early ages of computers, and computation, some high-processing computer (such as Cray computers) became famous for their vector-processing computers in the 1970s and 1980s. However, vector processors—both as CPUs and as full computer systems—have generally disappeared. Today, we have modern processor instruction sets that have modern vector processing instructions. In addition to these Vector processor examples, we have many Parallelism examples, such as; Multi-core computing, Symmetric multiprocessing, Distributed computing, Cluster computing, Massively parallel computing, Grid computing, Cloud computing, Specialized parallel computers, Reconfigurable computing with field-programmable gate arrays, General-purpose computing on graphics processing units (GPGPU), Application-specific integrated circuits. In 2012, by the improvements in GPUs, representatives from NVIDIA, Microsoft and Intel, independently proposed library approaches to parallel computing in the C++ Standard Library. The authors of these proposals submitted a design in a joint proposal to parallelize the existing standard algorithms library. This proposal was refined under the name of the “Parallelism Technical Specification” over two years. During this process, the Parallelism Technical Specification community, added a lot of feedback from their experimental implementations, since the final version which was published in 2015. As a result, the C++ Standardization Committee had spend three years of experience with the Technical Specification’s design, then all these Parallelism Technical Specifications are added to the C++17 standard, and they are improved in C++20, and still being improved in C++23. (source: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0024r2.html). Parallelism is very important part of programming, because your algorithm can speed up 100-200 times or more (depends of number of CPU cores or GPU cores/transistors). This is why it needs to be improved in every new standard. What is the std::sort algorithm parallelism feature in C++? One of the great examples of parallelism is the std::sort algorithm in modern C++. The Standard Template Library or STL has many algorithms for operations like searching, counting, […]
