Function ocl_core::enqueue_task

source ·
pub unsafe fn enqueue_task<En: ClNullEventPtr, Ewl: ClWaitListPtr>(
    command_queue: &CommandQueue,
    kernel: &Kernel,
    wait_list: Option<Ewl>,
    new_event: Option<En>,
    kernel_name: Option<&str>
) -> Result<()>
Expand description

Enqueues a command to execute a kernel on a device.

The kernel is executed using a single work-item.

From SDK: clEnqueueTask is equivalent to calling clEnqueueNDRangeKernel with work_dim = 1, global_work_offset = NULL, global_work_size[0] set to 1, and local_work_size[0] set to 1.

Safety

Running any kernel is an inherently unsafe process. The API call itself is safe but the kernel execution is not.