Chapter 7. Buffers and Sub-Buffers
In Chapter 2, we created a simple example that executed a trivial parallel OpenCL kernel on a device, and in Chapter 3, we developed a simple convolution example. In both of these examples, memory objects, in these cases buffer objects, were created in order to facilitate the movement of data in and out of the compute device’s memory, from the host’s memory. Memory objects are fundamental in working with OpenCL and include the following types:
• Buffers: one-dimensional arrays of bytes
• Sub-buffers: one-dimensional views into buffers
• Images: two-dimensional or three-dimensional data structured arrays, which have limited access operators and a selection of different formats, sampling, and clamping features ...
Get OpenCL Programming Guide 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.