3 ms·
In the newer C++ iterations (starting with C++17) there are parallel versions of nomral algorithms that accept an argument of type "ExecutionPolicy". These are
by sqeaky 9y ago
In the newer C++ iterations (starting with C++17) there are parallel versions of nomral algorithms that accept an argument of type "ExecutionPolicy". These are supposed to be supplied by the platform, but hardware vendors could supply them as well.
The execution policies that are provided with the stand will supprt launching normal OS thread on CPUs, but others could do all kinds of crazy things. They could perform the required operations on CPUs, GPU, Cuda, OpenCL or potentially on crazy hardware like this, where it makes sense to do so.
Here is one example, std::find has overloads that accept this: http://en.cppreference.com/w/cpp/algorithm/find http://en.cppreference.com/w/cpp/algorithm/find