Chapter 5. OpenCL Program and Kernel Objects
In the last two chapters we discussed about the OpenCL memory objects in the form of buffer and image objects. In the previously discussed examples of saxpy and histogram in first and the third chapter respectively; we implemented a parallel OpenCL C kernel, which is executed on a device. A program object and a kernel object were created before execution of the kernel. These kernel and program object are the important execution entities in the OpenCL framework. In this chapter we shall concentrate on the set up steps required to create a program object and execute a kernel. Once you have expertise in this then you can concentrate on the problem, which you want to solve using OpenCL. The following topics will be discussed in this chapter:
- Creating program objects
- Program build options
- Querying program objects
- Offline and online compilation
- Creating kernel objects
- Setting kernel arguments
- Executing the kernels
- Querying kernel objects
- Source versus...