cl.enqueue.kernel.unsafe: Execute an OpenCL kernel with less overhead

Description Usage Arguments Details

View source: R/rcl.r

Description

Just like cl.enqueue.kernel, but without expensive calls to stopifnot.

Usage

1
2
3
cl.enqueue.kernel.unsafe(queue, kernel, dimensions, global_work_size,
  arguments, local_work_size = NULL, global_work_offset,
  waitlist = NULL, return_event = NULL)

Arguments

queue

An opencl_command_queue object. The queue the operation will be put on.

kernel

The kernel to execute. An opencl_kernel object

dimensions

The dimensions of the kernel

global_work_size

The number of global threads in each dimension

arguments

A list of kernel arguments. Must be all opencl_buffer objects. Any names are ignored, the arguments are passed by position.

local_work_size

The number of local threads in each dimension inside a work-group. If left NULL, the OpenCL runtime will pick a value.

global_work_offset

The starting offset of the global thread ids in each dimension.

waitlist

OpenCL events that must complete before this operation can start. Not currently used, included for future use.

return_event

Schedule the kernel asynchronously and return an opencl event object. Not currently used, included for future use.

Details

cl.enqueue.kernel makes calls to stopifnot to ensure the types of arguments. This introduces significant overhead, so this function is without any type-checking, at the risk of crashing R if the wrong types are given. Note that global_work_offset is mandatory here.


caffeine-overload/rocl documentation built on May 6, 2019, 7:02 p.m.