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