O'Reilly logo

OpenCL Parallel Programming Development Cookbook by Raymond Tay

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

Using integer functions

The integer functions in OpenCL primarily provides useful ways in which you can use them to perform the usual mathematical calculations such as obtaining an absolute value, halving a value, locating the minimum or maximum of three values, cyclic shift of a number, and specialized form of multiplication which is designed to work for a certain class of problems. Many of the functions that we have mentioned such as min and max do not perform the comparisons in an atomic fashion, but if you do like to ensure that, then a class of atomic functions can be used instead and we'll examine them later.

A class of integer functions is the atomic functions, which allows the developer to swap values (single-precision floating-point values ...

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