Parallel Programming in C++
In this course we use Microsoft PPL (Parallel Patterns Library) for providing us with this high level abstraction and investigate how we can use PPL for implementing concurrent algorithms with high performance. We learn when to use concurrent programming and how to spot and fix concurrency issues, both for correctness and performance.
Writing programs that execute concurrently is hard, and one key factor for pulling off this feat successfully is to have the right abstractions. The days when we had to manage our threads manually are mostly gone and instead we use tasks and other abstraction so we can focus on the heart of our concurrent algorithms without polluting our code with lots of synchronization.
Finally we take a look at CPU hardware and see how we can use parallelism on multiple levels (Vectorization, Instruction Level Parallelism, Multiple Cores, Clusters) and how design principles apply regarding memory layout and task splitting.
Experienced C++ Developers.
Knowledge of multi-threaded programming using threads.
What you will learn
- How to avoid common optimization pitfalls.
- When to benefit from parallelism.
- How the underlying hardware contributes to parallelism.
- How to take advantage of multiple cores with C++ and Microsoft PPL.
- How to avoid common parallel pitfalls.
- How to debug parallel programs.
- Introduction to Concurrency
- C++11 Refresher
- Computer Architecture
- CPU and Memory Architecture
- Instruction level parallelism
- Memory Caching (NUMA)
- Cost of shared writes
- Identifying algorithms that are parallelizable
- Computation bound
- Memory bound
- IO bound
- Parallel patterns and algorithms
- Introduction to PPL
- Why tasks instead of threads?
- Runtime support
- Parallel for loops
- Synchronization in PPL
- Critical Sections
- Reader/Writer locks
- Cost of synchronization
- Visual Studio Debug Tools for Concurrency
- Concurrency Visualizer
- Parallel Stacks
- Parallel Tasks
- Parallel Watch
- Identifying anti-patterns
- Debugging PPL Algorithms
- Event Tracing
- Exception Handling
- Catching task::get/task::wait
- Exceptions inside parallel_for vs for-loops
- Alternatives to PPL
- Intel TBB
- Boost Thread
- STL Threads
- SIMD and Vector programming
- Masking and execution coherence
- Memory Layout
- Auto vectorization
C++ for Experienced DevelopersCategory: C++Duration: 3 daysPrice: 25 900 SEK
GPGPU Computing in C++ with CUDACategory: C++Duration: 2 daysPrice: 24 500 SEK
Contact us for details+46 40 61 70 720
All prices excluding VAT