You copied the Doc URL to your clipboard.

OpenCL execution model

The OpenCL execution model includes the host application, the context, and the operation of OpenCL kernels.

The host application

The host application runs on the application processor. The host application manages the execution of the kernels by setting up command queues for:

  • Memory commands.
  • Kernel execution commands.
  • Synchronization.
The context

The host application defines the context for the kernels. The context includes:

  • The kernels.
  • Compute devices.
  • Program objects.
  • Memory objects.
Operation of OpenCL kernels

Kernels run on compute devices. A kernel is a block of code that is executed on a compute device in parallel with other kernels. Kernels operate in the following sequence:

  1. The kernel is defined in a host application.
  2. The host application submits the kernel for execution on a compute device. A compute device can be an application processor, GPU, or another type of processor.

  3. When the application issues a command to submit a kernel, OpenCL creates the NDRange of work-items.
  4. An instance of the kernel is created for each element in the NDRange. This enables each element to be processed independently in parallel.
Was this page helpful? Yes No