Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Processors and operating systems vary in how they store basic data. An int may be 32 bits wide on one system and 64 bits wide on another. This isn’t a concern if you’re writing code for a single platform, but OpenCL code needs to compile on multiple platforms. Therefore, it requires a standard set of primitive data types.
Table 2.1 lists OpenCL’s primitive data types. As you can see, these are all similar to their traditional counterparts in C and C++.