OpenCL Programming Guide
by Aaftab Munshi, Benedict R. Gaster, Timothy G. Mattson, James Fung, Dan Ginsburg
Listings
Listing 2.1 HelloWorld OpenCL Kernel and Main Function 46
Listing 2.2 Choosing a Platform and Creating a Context 49
Listing 2.3 Choosing the First Available Device and Creating a Command-Queue 51
Listing 2.4 Loading a Kernel Source File from Disk and Creating and Building a Program Object 53
Listing 2.5 Creating a Kernel 54
Listing 2.6 Creating Memory Objects 55
Listing 2.7 Setting the Kernel Arguments, Executing the Kernel, and Reading Back the Results 56
Listing 3.1 Enumerating the List of Platforms 66
Listing 3.2 Querying and Displaying Platform-Specific Information 67
Listing 3.3 Example of Querying and Displaying Platform-Specific Information 79
Listing 3.4 Using Platform, Devices, and Contexts—Simple Convolution Kernel 90
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access