O'Reilly logo

OpenCL Programming by Example by Koushik Bhattacharyya, Ravishekhar Banger

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 4. OpenCL Images

In the previous chapter, we discussed the OpenCL buffers, which are the most important OpenCL objects. They represent the handle to the OpenCL device memory. We discussed how to create a buffer, sub-buffer, transfer the host allocated data to the device, and mapping or un-mapping of the OpenCL buffer. The OpenCL buffers provide caching for regular linear buffers only in one dimension. Many OpenCL devices have a texture processor, which can cache pixels in an image which are its neighbor. So providing a separate interface for images is useful, and can be used to enhance the performance of applications.

In this chapter we will discuss the OpenCL image objects, which are also represented by cl_mem.

We will discuss the following ...

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