Basic concepts of Boost Compute

Boost Compute has a few basic concepts, which are good to grasp before going further:

  • Device, the equivalent of the actual GPU on which the operations will be executed
  • Context, the context could be considered the gate to the device
  • Queue, a command queue on which you push operations, which are then executed asynchronously via the GPU driver

On top of that, as GPUs in many cases have their own exclusive memory (although it often uses the standard RAM), all containers handled by Boost Compute must be copied to Boost Compute's designated containers before processing, and back to standard containers for further processing by the CPU.

Get C++ High Performance 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.