Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

2.1. Primitive data types

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++.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint