Название: Programming Your GPU with OpenMP: Performance Portability for GPUs
Автор: Tom Deakin, Timothy G. Mattson
Издательство: The MIT Press
Год: 2023
Страниц: 336
Язык: английский
Формат: epub
Размер: 13.1 MB
The essential guide for writing portable, parallel programs for GPUs using the OpenMP programming model. Today’s computers are complex, multi-architecture systems: multiple cores in a shared address space, graphics processing units (GPUs), and specialized accelerators. To get the most from these systems, programs must use all these different processors. In Programming Your GPU with OpenMP, Tom Deakin and Timothy Mattson help everyone, from beginners to advanced programmers, learn how to use OpenMP to program a GPU using just a few directives and runtime functions. Then programmers can go further to maximize performance by using CPUs and GPUs in parallel—true heterogeneous programming. And since OpenMP is a portable API, the programs will run on almost any system. This book will help you learn how to program a GPU with OpenMP. The first part of the book provides the background you need to understand GPU programming with OpenMP. We start by reviewing hardware developments that programmers need to understand. We explain the GPU, its differences and similarities to the modern CPU. Next, we include a chapter that summarizes how to use OpenMP to program multithreaded systems (i.e., multicore systems with a shared address space). With this background in place, you will be ready for our core topic: how to use OpenMP to program heterogeneous systems composed of CPUs and GPUs. An online repository containing source code for the example programs from the book—provided in all languages currently supported by OpenMP: C, C++, and Fortran.