After setting up the runtime environment, such as identifying devices, creating the context, command queue, and program, the host application should identify the kernels that will execute on the device, and set up the kernel arguments.
The OpenCL API
should be used to access the kernels contained within
the .xclbin file (the "program"). The
cl_kernel object identifies a kernel in the program loaded into
the FPGA that can be run by the host application. The following code example identifies two
kernels defined in the loaded program.
kernel1 = clCreateKernel(program, "<kernel_name_1>", &err); kernel2 = clCreateKernel(program, "<kernel_name_2>", &err); // etc