O'Reilly logo

OpenCL Programming by Example by Koushik Bhattacharyya, Ravishekhar Banger

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating kernel objects

In this section we will discuss details about the kernel objects, and how kernel objects can be created using the program objects. Every program is a collection of kernels, you can consider a program object as a library of kernels. As shown in the following figure a program is associated with kernel1 and kernel2. The program is built with inputs as two devices device1 and device2. A kernel when enqueued on the command queue, the OpenCL runtime generates the binary for execution on the device. Note that each kernel can be executed on different devices. It is at the runtime the binaries are generated.

A kernel object can be created from a well formed OpenCL C program, which is built as discussed in the previous section. A ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required