O'Reilly logo

OpenCL in Action: How to Accelerate Graphics and Computation by Matthew Scarpino

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 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. ...

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