Chapter 3. Host programming: data transfer and partitioning

 

This chapter covers
  • Creating memory objects to serve as kernel arguments
  • Commands that transfer data between the host and a device
  • Partitioning kernel execution using work-items and work-groups

 

The preceding chapter explained a great deal about host applications, from accessing platforms to creating kernels. But to do their jobs, devices need more than just kernels—they need data. If you want a device to perform a nontrivial computing task, you have to provide at least three pieces of information: the instructions to be executed, a buffer containing data to be processed, and a buffer where processed data should be stored.

In regular C/C++ programming, this isn’t a big deal. ...

Get OpenCL in Action 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.