Chapter 8. Development with C++

 

This chapter covers
  • Creating kernels with the C++ Wrapper API
  • Enqueuing commands with the CommandQueue class
  • Processing events with the Event and UserEvent classes

 

When I need to crunch numbers at high speed, I prefer to write code in C. This is because my favorite compilers are optimized for high-speed processing, the executables tend to be small, and there’s usually plenty of code available on the internet from which I can draw inspiration.

But when my application needs to do more than just crunch numbers, such as animate an assemblage of moving parts, I prefer an object-oriented (OO) language like C++. This gives me the benefits associated with OO programming, such as polymorphism, inheritance, and ...

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.