Preface

If you are reading this book, I don't expect to have to sell you on CUDA. Readers of this book probably should be familiar with CUDA, either by using NVIDIA's SDK materials and documentation, by taking a course on parallel programming, or with the help of the excellent introductory book CUDA By Example by Jason Sanders and Edward Kandrot.

Reviewing CUDA By Example, I am still struck by how much ground the book covers. Assuming no special knowledge from the audience, the authors manage to describe everything from memory types and their applications to graphics interoperability and even atomic operations. It is an excellent introduction to CUDA. But, it is just that -- an introduction. When it came to giving more-detailed descriptions of the workings of the platform, the GPU hardware, the compiler driver nvcc, and important "building block" parallel algorithms like parallel prefix sum ("scan"), Jason and Edward rightly left those tasks to others.

This book is intended to help novice-to-intermediate CUDA programmers continue to elevate their game, building on the foundation laid by earlier work. In addition, while introductory texts are best read from beginning to end, The CUDA Handbook can be sampled: if you're preparing to build or program a new CUDA-capable platform, a review of Chapter 2 (Hardware Architecture) might be in order. If you are wondering whether your application would benefit from using CUDA streams for additional concurrency, take a look at Chapter 6 (Streams and Events). Other chapters give detailed descriptions of the software architecture, GPU subsystems such as texturing and the Streaming Multiprocessors, and applications chosen according to their data access pattern and their relative importance in the universe of parallel algorithms. The chapters are relatively self-contained, though they do reference one another when appropriate.

The latest innovations, up to and including CUDA 5.0, also are covered here. In the last few years, CUDA and its target platforms have significantly evolved. When CUDA By Example was published, the GeForce GTX 280 ("GT200") was new; since then, not one but two generations of CUDA-capable hardware have become available. So besides more-detailed discussions of existing features such as mapped pinned memory, this book also covers new instructions like Fermi's "ballot" and Kepler's "shuffle" and features such as 64-bit and unified virtual addressing and dynamic parallelism. We also discuss recent platform innovations, such as the integration of the PCI Express bus controller into Intel's "Sandy Bridge" CPUs.

However you choose to read the book -- whether you read it straight through or keep it by your keyboard and consult it periodically, it's my sincerest hope that you will enjoy reading it as much as I enjoyed writing it.