OpenCL in Action: How to Accelerate Graphics and Computation cover
welcome to this free extract from
an online version of the Manning book.
to read more

About this Book


OpenCL is a complex subject. To code even the simplest of applications, a developer needs to understand host programming, device programming, and the mechanisms that transfer data between the host and device. The goal of this book is to show how these tasks are accomplished and how to put them to use in practical applications.

The format of this book is tutorial-based. That is, each new concept is followed by example code that demonstrates how the theory is used in an application. Many of the early applications are trivially basic, and some do nothing more than obtain information about devices and data structures. But as the book progresses, the code becomes more involved and makes fuller use of both the host and the target device. In the later chapters, the focus shifts from learning how OpenCL works to putting OpenCL to use in processing vast amounts of data at high speed.


In writing this book, I’ve assumed that readers have never heard of OpenCL and know nothing about distributed computing or high-performance computing. I’ve done my best to present concepts like task-parallelism and SIMD (single instruction, multiple data) development as simply and as straightforwardly as possible.


Obtaining and compiling the example code

Code conventions

Author Online

About the cover illustration