What is the new reduce algorithm in C++17?
Learn how to allow for parallelization using the reduce algorithm, new in C++17.
Reduce is one of many useful new algorithms to be introduced in C++17. In this video, Jason Turner first demonstrates the logic behind the existing accumulate algorithm. Jason then goes on to explain how the new reduce algorithm acts as an out of order version of accumulate and can be used to work around a common error. Intermediate C++ programmers will understand how the new reduce algorithm’s execution policy allows them to instruct the compiler to allow for parallelization.
Access in-depth C++ training with our Beginning C++ Learning Path.
Jason Turner is a Microsoft MVP certified trainer backed by over 12 years of experience as a C++ developer. An active member of the C++ community who has spoken at CppCon and C++Now, Jason is the ongoing co-host of of CppCast, a podcast for C++ developers. Jason is also the co-creator and maintainer of the embedded C++ scripting language, ChaiScript, and the author and curator of the collaborative coding standards document, C++ Best Practices.