~/talk

C++ Parallel Programming Models

Talkat NDC TechTown 2020 · 2020-08-31..09-03· [c-and-cpp]
links:none on file
slides:none on file

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

  1. 0:00Intro
  2. 0:37About me
  3. 2:03Why parallel programming? 1. Performance 2. Hide I/O 3. Responsiveness
  4. 4:06C++ parallel programming facilities
  5. 4:41C++ parallel programming models
  6. 5:43Talk outline
  7. 7:47Major components (partial list)
  8. 9:15Missing part - safe shared state
  9. 11:14Thread-level API shortcomings
  10. 12:31Model #2: Task-based parallelism
  11. 13:42Tasks are asynchronous
  12. 16:03async execution
  13. 18:12future and promise
  14. 19:18packaged_task
  15. 20:44What's C++ tasks model like?
  16. 21:25Experimental future features
  17. 22:19Coroutines and executors
  18. 25:21Threads vs. tasks
  19. 27:45Model #3: Data parallelism
  20. 28:28C++ Parallel algorithms
  21. 30:27Using parallel algorithms
  22. 33:08sequenced_policy Forces execution to take place on the calling thread + Differs from no-policy call
  23. 42:41Models comparison Unstructured
  24. 45:18Mixing models - unstructured context
  25. 47:15Mixing models - tasks context
  26. 48:27Mixing models - parallel algorithms
  27. 49:07Summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.