logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

clCreateKernelsInProgram - Creates kernel objects for all kernel functions in a program object.

Authors

TheKhronosGroup

Errors

       Returns CL_SUCCESS if the kernel objects are successfully allocated. Otherwise, it returns one of the
       following errors:

       •   CL_INVALID_PROGRAM if program is not a valid program object.

       •   CL_INVALID_PROGRAM_EXECUTABLE if there is no successfully built executable for any device in program.

       •   CL_INVALID_VALUE if kernels is not NULL and num_kernels is less than the number of kernels in
           program.

       •   CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation
           on the device.

       •   CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL
           implementation on the host.

Name

       clCreateKernelsInProgram - Creates kernel objects for all kernel functions in a program object.

       cl_intclCreateKernelsInProgram(cl_programprogram,cl_uintnum_kernels,cl_kernel*kernels,cl_uint*num_kernels_ret);

Notes

        1. OpenCL Specification
           page 158, section 5.7.1 - Creating Kernel Objects

The Khronos Group                                  11/18/2024                         CLCREATEKERNELSINPRO(3clc)

Parameters

program
           A program object with a successfully built executable.

        num_kernels
           The size of memory pointed to by kernels specified as the number of cl_kernel entries.

        kernels
           The buffer where the kernel objects for kernels in program will be returned. If kernels is NULL, it
           is ignored. If kernels is not NULL, num_kernels must be greater than or equal to the number of
           kernels in program.

        num_kernels_ret
           The number of kernels in program. If num_kernels_ret is NULL, it is ignored.

See Also

clCreateKernel(3clc), clRetainKernel(3clc), clReleaseKernel(3clc), clSetKernelArg(3clc),
       clGetKernelInfo(3clc), clGetKernelWorkGroupInfo(3clc), classDiagram(3clc)

Specification

OpenCLSpecification[1]

See Also