To create a kernel object, use the function
const char* kernel_name,
program is a program object with a successfully built executable.
kernel_name is a function name in the program declared with the
errcode_ret will return an appropriate error code. If errcode_ret is
NULL, no error code is returned.
clCreateKernel returns a valid non-zero kernel object and errcode_ret is
CL_SUCCESS if the kernel object is created successfully.
Otherwise, it returns a
NULL value with one of the following error values
returned in errcode_ret:
CL_INVALID_if program is not a valid program object.
CL_INVALID_if there is no successfully built executable for program.
CL_INVALID_if kernel_name is not found in program.
CL_INVALID_if the function definition for
__kernelfunction given by kernel_name such as the number of arguments, the argument types are not the same for all devices for which the program executable has been built.
CL_INVALID_if kernel_name is
CL_OUT_if there is a failure to allocate resources required by the OpenCL implementation on the device.
CL_OUT_if there is a failure to allocate resources required by the OpenCL implementation on the host.
OF_ HOST_ MEMORY
For more information, see the OpenCL Specification
This page is extracted from the OpenCL Specification. Fixes and changes should be made to the Specification, not directly.