This chapter provides four complete OpenCL examples (both host code and kernels). The examples include OpenCL implementations of histogram, image rotation, and convolution, as well as a producer-consumer design executing on multiple devices. These algorithms illustrate features such as communication via local memory, atomic operations, images, samplers, and pipes.
4.1 OpenCL Examples
This chapter discusses some basic OpenCL examples, which allow us to summarize our understanding of the specification discussed in Chapter 3. These examples demonstrate the programming steps needed to write complete ...
Get Heterogeneous Computing with OpenCL 2.0 now with O’Reilly online learning.
O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.