C++ Parallel Programming Models
summary
Three concrete C++ models: threads, atomics, mutex for raw control and max performance but high bug risk; std::async and std::future for task-based work with package_task, std::jthread, coroutines coming and executors planned (std::async may or may not spawn a real thread); and parallel algorithms with execution policies (seq, par, unseq) that require forward iterators, aren’t container-threadsafe, and are only widely available in GCC 9, recent MSVC and vendor libs. Practical tips on when each actually fits are given.
AI-written summary · about
chapters (27)
- 0:00Intro
- 0:37About me
- 2:03Why parallel programming? 1. Performance 2. Hide I/O 3. Responsiveness
- 4:06C++ parallel programming facilities
- 4:41C++ parallel programming models
- 5:43Talk outline
- 7:47Major components (partial list)
- 9:15Missing part - safe shared state
- 11:14Thread-level API shortcomings
- 12:31Model #2: Task-based parallelism
- 13:42Tasks are asynchronous
- 16:03async execution
- 18:12future and promise
- 19:18packaged_task
- 20:44What's C++ tasks model like?
- 21:25Experimental future features
- 22:19Coroutines and executors
- 25:21Threads vs. tasks
- 27:45Model #3: Data parallelism
- 28:28C++ Parallel algorithms
- 30:27Using parallel algorithms
- 33:08sequenced_policy Forces execution to take place on the calling thread + Differs from no-policy call
- 42:41Models comparison Unstructured
- 45:18Mixing models - unstructured context
- 47:15Mixing models - tasks context
- 48:27Mixing models - parallel algorithms
- 49:07Summary








