Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Many fields, such as cryptography and bioinformatics, model data using integers. OpenCL provides a wide range of integer operations, and this section divides them into three categories: addition and subtraction, multiplication, and miscellaneous. In each case, the integer data type refers to all signed and unsigned integers: uchar, char, ushort, short, uint, int, ulong, and long. The uinteger type refers to only unsigned integers: uchar, ushort, uint, and ulong.
OpenCL provides the + and - operators for addition and subtraction, but these may not be sufficient for all cases. Table 5.10 lists the OpenCL functions that add and subtract integers.