Previous  Next

CLExecute

The function runs an OpenCL program. There are 3 versions of the function:

1. Launching kernel functions using one kernel

bool  CLExecute(
   int          kernel                    // Handle to the kernel of an OpenCL program
   );

2. Launching several kernel copies (OpenCL function) with task space description

bool  CLExecute(
   int          kernel,                   // Handle to the kernel of an OpenCL program
   uint         work_dim,                 // Dimension of the tasks space
   const uint&  global_work_offset[],     // Initial offset in the tasks space
   const uint&  global_work_size[]        // Total number of tasks
   );

3. Launching several kernel copies (OpenCL function) with task space description and specification of the size of the group's local task subset

bool  CLExecute(
   int          kernel,                   // Handle to the kernel of an OpenCL program
   uint         work_dim,                 // Dimension of the tasks space
   const uint&  global_work_offset[],     // Initial offset in the tasks space
   const uint&  global_work_size[],       // Total number of tasks
   const uint&  local_work_size[]         // Number of tasks in the local group
   );

Parameters

kernel

[in]  Handle to the OpenCL kernel.

work_dim

[in]  Dimension of the tasks space.

global_work_offset[]

[in]  Initial offset in the tasks space.

global_work_size[]

[in]  The size of a subset of tasks.

local_work_size[]

[in]  The size of the group's local task subset.

Return Value

Returns true if successful, otherwise returns false. For information about the error, use the GetLastError() function.

Note

Consider the use of the parameters in the following example: