Creates a kernel object.
cl_kernel clCreateKernel(cl_program program, const char *kernel_name, cl_int *errcode_ret)
A program object with a successfully built executable.
A function name in the program declared with the
Returns an appropriate error code. If
errcode_retis NULL, no error code is returned.
A kernel is a function declared in a program.
A kernel is identified by the
kernel qualifier applied to any function in a program.
A kernel object encapsulates the specific
kernel function declared in a program and the argument values to be used when executing this
clCreateKernel returns a valid non-zero kernel object and
errcode_ret is set to
CL_SUCCESS if the kernel object is created successfully.
Otherwise, it returns a NULL value with one of the following error values returned in
programis not a valid program object.
CL_INVALID_PROGRAM_EXECUTABLEif there is no successfully built executable for
kernel_nameis not found in
CL_INVALID_KERNEL_DEFINITIONif the function definition for
__kernelfunction given by
kernel_namesuch as the number of arguments, the argument types are not the same for all devices for which the
programexecutable has been built.
CL_OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.
CL_OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.