Parallel Algorithms: Work Smarter, Not Harder
summary
Adds one execution-policy parameter to use C++17 parallel algorithms and the library handles thread management; performance wins appear only on large data and when avoiding synchronization. Key specifics: reduce requires associativity (accumulate stays for non‑associative ops), floating‑point math can change results, use transform_reduce/transform_inclusive_scan to fix ordering issues, and execution policies (seq, par, unseq, par_unseq) impose different synchronization rules — par_unseq and unseq forbid synchronization — don’t mix with OpenMP.
AI-written summary · about
chapters (15)
- 0:00Parallel algorithms in C++
- 2:15Standard library next-gen parallelism
- 3:39Old vs new parallelism
- 7:10Why some algorithms can't parallelize
- 12:31Accumulate vs reduce fixes
- 13:57Inner product vs transform reduce
- 16:24Partial sum: inclusive/exclusive scan
- 22:34Exceptions in parallel algorithms
- 23:40Efficiency and limits of parallelism
- 25:53Synchronization bottlenecks
- 27:41Execution policies: sequential, parallel, unsequenced, vectorized
- 36:07Downsides of parallel algorithms
- 38:40Future of C++ parallelism
- 39:23Key takeaways for parallelism
- 40:30Q&A
related talks
57m“The C++17 Parallel Algorithms Library and Beyond"
56mParallelizing the C++ Standard Template Library
01h 00mC++ Standard Parallelism
01h 02mInside Visual C++' Parallel Algorithms
01h 02m“Parallelism in Modern C++"
01h 05m“Concurrency, Parallelism and Coroutines”
01h 32mConcurrency, Parallelism and Coroutines
01h 05mThink Parallel
