C++17 Parallel Algorithms
summary
C++17 adds standardized parallel algorithms that accept execution policies (seq, par, par_unseq) and require element access functions to be race free, copyable, and usually non-throwing (exceptions cause terminate); input-iterator support is optional. Implementations are partial: HPX is closest, mainstream libs omit par_unseq and compiler support is lacking. Benchmarks on a 64-core Xeon Phi show huge speedups (map-like heavy workloads up to ~100×, sort ~8–16×); desktop reaches ~4× for CPU-bound work; small or memory-bound ranges often slow down.
AI-written summary · about
chapters (40)
- 0:00Intro
- 0:15WARNING!
- 0:33Lots of Concurrency
- 1:20C++ is Sequential
- 2:30Example
- 3:37Use OpenMP
- 4:45Use std::thread
- 6:22Use TBB
- 7:24Parallel Algorithm
- 9:16Status Quo
- 9:29Objective
- 12:19Concurrency Model
- 13:48Element Access Functions
- 15:57Execution Policy
- 18:18std::execution::seq
- 22:28std::execution::par_unseq
- 23:54Supported Algorithms
- 25:31Algorithms: heap
- 25:59Algorithms: permutation
- 26:17Algorithms: overlapping
- 27:06Algorithms: oddballs
- 27:51Algorithms: map generale_n
- 29:05Additional Constraints
- 29:45Algorithms: reduce
- 32:49Algorithms: scan
- 35:47Algorithms: fused
- 36:42Algorithms: gather
- 37:22Algorithms: special
- 37:56Availability
- 39:35Current Implementations
- 41:26HPX Usage
- 42:06Results: Machines
- 44:00Results: map gcc phi
- 46:23Results: work gcc phi
- 47:53Results: sort gcc phi
- 48:30Results: reduce
- 49:25Results: redu gcc ARM
- 50:09Usage Guidance
- 50:41Future Directions
- 52:42Conclusions
related talks
57m“The C++17 Parallel Algorithms Library and Beyond"
57mC++ Standard Parallelism
58mC++ Standard Parallelism
01h 02m“Parallelism in Modern C++"
01h 02mInside Visual C++' Parallel Algorithms
50mC++ Parallel Programming Models
01h 00mC++17 in Breadth (part 2 of 2)
49mFrom Algorithm to Generic, Parallel Code
