Inside Visual C++' Parallel Algorithms
summary
Visual C++ implements C++17 parallel algorithms by partitioning ranges, scheduling work on Windows Thread Pool calls like CreateThreadpoolWork, and merging partial results; reduce replaces accumulate to require associativity and commutativity and each partition builds its own partial sum. Partition count uses a 32× thread heuristic (threads × 32) with extra logic for non-random-access ranges (two traversals) and fallback to serial on allocation failure. VTune shows memory bandwidth limits explain modest speedups (about 5× debug, ~1.3× release on a 4-core laptop), and stable_sort uses an N-sized temporary plus bitmasked merge-tree coordination.
AI-written summary · about
chapters (8)
- 0:00Introduction to parallel algorithms
- 1:05Parallelizing algorithms basics
- 10:06Demo application overview
- 13:15Reduce algorithm implementation
- 27:50Partitioning strategies
- 37:06Performance analysis with VTune
- 45:49Stable sort parallelization
- 53:45Q&A session
related talks
57mC++17 Parallel Algorithms
57m“The C++17 Parallel Algorithms Library and Beyond"
43mParallel Algorithms: Work Smarter, Not Harder
57mC++ Standard Parallelism
56mParallelizing the C++ Standard Template Library
49mFrom Algorithm to Generic, Parallel Code
01h 00mC++ Standard Parallelism
58mC++ Standard Parallelism
