Sample Code

Sample Code for The OpenCL Programming Book 1.2

The sample code contained in the book can be downloaded from here:

Download (zip:2.16MB)

Requirements to execute the sample code

The sample code was tested with following environments:

  • NVIDIA CUDA SDK 4.1 + NVIDIA C2050
  • AMD APP SDK 2.6 + AMD FirePro v7900
  • Intel OpenCL SDK 1.5 + Intel Core i7 2600

And operating systems:

  • Linux: Ubuntu 11.04 x86_64
  • Mac: Mac OS X Lion 10.7
  • Windows: Windows 7 Pro 64-bit (tested only with AMD's OpenCL)

If you use an NVIDIA GPU on Windows, please turn off TDR to disable graphics timeout. For more information, please visit:
http://www.microsoft.com/whdc/device/display/wddm_timeout.mspx

Limitation specific to sample code 6-2/4

Due to hardware resources used within the kernel, the NVIDIA GPU must contain more than 16 CUDA cores.

Sample Code for The OpenCL Programming Book 1.0

The sample code contained in the book can be downloaded here:

Download (zip:2.16MB)

Limitations in executing the sample code

The sample code will not run on the OpenCL environment that comes with the CUDA SDK 3.0. Please download the OpenCL SDK from the link below.
http://developer.nvidia.com/object/get-opencl.html

Also, when using an NVIDIA GPU on Windows, the TDR (a graphics timeout function) must be turned off. For details, please visit the link below.
http://www.microsoft.com/whdc/device/display/wddm_timeout.mspx

Limitation specific to sample code 6-2/4

Due to hardware resources used within the kernel, the NVIDIA GPU must contain more than 16 CUDA cores.

For inquiries regarding The OpenCL Programming Book

Please contact us here.