Implementing Parallel std::transform()

Learn about implementing parallel std::transform() with a naive approach, evaluate its performance, and understand the shortcomings of the implementation.

Although algorithmically, std::transform() is easy to implement, in practice, implementing even a rudimentary parallel version is more complex than it might appear at first sight.

The algorithm std::transform() calls a function for each element in a sequence and stores the result in another sequence. A possible implementation of a sequential version of std::transform() may look something like this:

Get hands-on with 1200+ tech skills courses.