Multicore and GPU Programming: An Integrated Approach, Second Edition offers broad coverage of key parallel computing tools, essential for multi-core CPU programming and many-core "massively parallel" computing. Using threads, OpenMP, MPI, CUDA and other state-of-the-art tools, the book teaches the design and development of software capable of taking advantage of modern computing platforms that incorporate CPUs, GPUs and other accelerators.
Presenting material refined over more than two decades of teaching parallel computing, author Gerassimos Barlas minimizes the challenge of transitioning from sequential programming to mastering parallel platforms with multiple examples, extensive case studies, and full source code. By using this book, readers will better understand how to develop programs that run over distributed memory machines using MPI, create multi-threaded applications with either libraries or directives, write optimized applications that balance the workload between available computing resources, and profile and debug programs targeting parallel machines.
1. Part 1: Introduction - p. xxii 2. Chapter 1. Introduction - p. 3 3. Chapter 2. Multicore and parallel program design - p. 31 4. Part 2: Programming with threads and processes - p. 61 5. Chapter 3. Threads and concurrency in standard C++ - p. 65 6. Chapter 4. Parallel data structures - p. 181 7. Chapter 5. Distributed memory programming - p. 231 8. Chapter 6. GPU programming: CUDA - p. 389 9. Abstract - p. 389 10. 6.1 Introduction - p. 389 11. 6.2 CUDA's programming model: threads, blocks, and grids - p. 392 12. 6.3 CUDA's execution model: streaming multiprocessors and warps - p. 398 13. 6.4 CUDA compilation process - p. 401 14. 6.5 Putting together a CUDA project - p. 406 15. 6.6 Memory hierarchy - p. 409 16. 6.7 Optimization techniques - p. 433 17. 6.8 Graphs - p. 482 18. 6.9 Warp functions - p. 501 19. 6.10 Cooperative groups - p. 500 20. 6.11 Dynamic parallelism - p. 523 21. 6.12 Debugging CUDA programs - p. 527 22. 6.13 Profiling CUDA programs - p. 529 23. 6.14 CUDA and MPI - p. 533 24. 6.15 Case studies - p. 539 25. Exercises - p. 578 26. Bibliography - p. 581 27. Chapter 7. GPU and accelerator programming: OpenCL - p. 583 28. Part 3: Higher-level parallel programming - p. 680 29. Chapter 8. Shared-memory programming: OpenMP - p. 683 30. Chapter 9. High-level multi-threaded programming with the Qt library - p. 803 31. Chapter 10. The Thrust template library - p. 835 32. Part 4: Advanced topics - p. 884 33. Chapter 11. Load balancing - p. 887 34. Appendix A. Creating Qt programs - p. 943 35. Appendix B. Running MPI programs: preparatory and configuration steps - p. 945 36. Appendix C. Time measurement - p. 949 37. Appendix D. Boost.MPI - p. 955 38. Appendix E. Setting up CUDA - p. 957 39. Appendix F. OpenCL helper functions - p. 961 40. Appendix G. DLTlib - p. 967 41. Glossary - p. 977 42. Bibliography - p. 979 43. Index - p. 983
Multicore and GPU Programming: An Integrated Approach, Second Edition offers broad coverage of key parallel computing tools, essential for multi-core CPU programming and many-core "massively parallel" computing. Using threads, OpenMP, MPI, CUDA and other state-of-the-art tools, the book teaches the design and development of software capable of taking advantage of modern computing platforms that incorporate CPUs, GPUs and other accelerators.
Presenting material refined over more than two decades of teaching parallel computing, author Gerassimos Barlas minimizes the challenge of transitioning from sequential programming to mastering parallel platforms with multiple examples, extensive case studies, and full source code. By using this book, readers will better understand how to develop programs that run over distributed memory machines using MPI, create multi-threaded applications with either libraries or directives, write optimized applications that balance the workload between available computing resources, and profile and debug programs targeting parallel machines.
1. Part 1: Introduction - p. xxii 2. Chapter 1. Introduction - p. 3 3. Chapter 2. Multicore and parallel program design - p. 31 4. Part 2: Programming with threads and processes - p. 61 5. Chapter 3. Threads and concurrency in standard C++ - p. 65 6. Chapter 4. Parallel data structures - p. 181 7. Chapter 5. Distributed memory programming - p. 231 8. Chapter 6. GPU programming: CUDA - p. 389 9. Abstract - p. 389 10. 6.1 Introduction - p. 389 11. 6.2 CUDA's programming model: threads, blocks, and grids - p. 392 12. 6.3 CUDA's execution model: streaming multiprocessors and warps - p. 398 13. 6.4 CUDA compilation process - p. 401 14. 6.5 Putting together a CUDA project - p. 406 15. 6.6 Memory hierarchy - p. 409 16. 6.7 Optimization techniques - p. 433 17. 6.8 Graphs - p. 482 18. 6.9 Warp functions - p. 501 19. 6.10 Cooperative groups - p. 500 20. 6.11 Dynamic parallelism - p. 523 21. 6.12 Debugging CUDA programs - p. 527 22. 6.13 Profiling CUDA programs - p. 529 23. 6.14 CUDA and MPI - p. 533 24. 6.15 Case studies - p. 539 25. Exercises - p. 578 26. Bibliography - p. 581 27. Chapter 7. GPU and accelerator programming: OpenCL - p. 583 28. Part 3: Higher-level parallel programming - p. 680 29. Chapter 8. Shared-memory programming: OpenMP - p. 683 30. Chapter 9. High-level multi-threaded programming with the Qt library - p. 803 31. Chapter 10. The Thrust template library - p. 835 32. Part 4: Advanced topics - p. 884 33. Chapter 11. Load balancing - p. 887 34. Appendix A. Creating Qt programs - p. 943 35. Appendix B. Running MPI programs: preparatory and configuration steps - p. 945 36. Appendix C. Time measurement - p. 949 37. Appendix D. Boost.MPI - p. 955 38. Appendix E. Setting up CUDA - p. 957 39. Appendix F. OpenCL helper functions - p. 961 40. Appendix G. DLTlib - p. 967 41. Glossary - p. 977 42. Bibliography - p. 979 43. Index - p. 983