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 ...
Get OpenCL Programming by Example now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.