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

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