O'Reilly logo

Heterogeneous Computing with OpenCL by Dana Schaa, Perhaad Mistry, David R. Kaeli, Lee Howes, Benedict Gaster

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. OpenCL Case Study
Convolution
This chapter discusses the implementation of more advanced optimizations of OpenCL kernels to improve the performance of a convolution filter.
Keywords Convolution, example program, OpenCL

Introduction

In Chapter 4, we introduced a basic convolution example using OpenCL images. Images provided the benefit of automatically handling out-of-bounds accesses (by clamping or wrapping accesses), which simplified the coding that would have been required for the cases in which the convolution filter accessed data outside of the image. Thus, image support may reduce control flow overhead and provide caching and data access transformations that improve memory system performance. When targeting GPUs, the automatic caching ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required