-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
OpenCL Programming by Example
By :
In OpenCL C you cannot include the standard header files provided by C99 standard such as, math.h, stdio.h, stdlib.h, errno.h, and so on. OpenCL C provides a huge set of built in functions, which can be used by the programmer for programming the OpenCL kernels. Using built-in functions wherever possible may result in performance enhancement. Also this will make sure the code is portable across different vendors. We will discuss briefly the group of built-ins and will leave it to the reader to take a look at section 6.12 of OpenCL specification 1.2.
While enqueuing a kernel using clEnqueueNDRangeKernel, we specify the global and local work sizes. To determine these values during the kernel function execution time or to which index a work item belongs in the NDRange, OpenCL provides some built-in functions. They are as follows:
|
Function |
Description |
|---|---|
|
|
Returns the number of dimensions associated with the kernel launch. |
|
|
Change the font size
Change margin width
Change background colour