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 5. Kernel programming: operators and functions

 

This chapter covers
  • Operators for scalar and vector types
  • OpenCL’s built-in functions and their usage in code

 

Chapter 4 discussed data types and emphasized the different types of vectors available. Vectors can dramatically improve an application’s performance by making it possible to operate on multiple values at once. But before you can use them in a practical application, you need to know what operators and functions are available to process them. The goal of this chapter is to explain these operators and functions, and to provide example code to demonstrate their usage.

Most of these operators and functions relate to mathematics, and the OpenCL working group has wisely kept to ...

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