cl_kernel clCreateKernel
(
| cl_program program, |
| const char *kernel_name, | |
cl_int *errcode_ret) |
program
A program object with a successfully built executable.
kernel_name
A function name in the program declared with the __kernel qualifier
errcode_ret
Returns an appropriate error code. If errcode_ret is 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 __kernel function.
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 errcode_ret:
program is not a valid program object.
program.
kernel_name is not found in program.
__kernel function
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.
kernel_name is NULL.
clCreateKernelsInProgram, clRetainKernel, clReleaseKernel, clSetKernelArg, clGetKernelInfo, clGetKernelWorkGroupInfo, Cardinality Diagram
Copyright © 2007-2010 The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.