Function pocky_opencl_kernel_lookup_by_name

Function Documentation

cl_int pocky_opencl_kernel_lookup_by_name(cl_uint num_kerns, cl_kernel *kerns, const char *name, cl_kernel *kern)

Gets the first kernel function from an array with the matching name.

Important

The user is responsible for checking the return code before using the kernel in kern, since the handle is not valid if no matching kernel was found.

Parameters:
  • num_kerns[in] Number of kernels in the array

  • kerns[in] Array of kernels

  • name[in] Name of the desired kernel function

  • kern[out] Kernel with the matching name

Returns:

On success, CL_SUCCESS, otherwise an OpenCL error code