Function cl3::kernel::set_kernel_arg
source · pub unsafe fn set_kernel_arg(
kernel: cl_kernel,
arg_index: cl_uint,
arg_size: size_t,
arg_value: *const c_void
) -> Result<(), cl_int>
Expand description
Set the argument value for a specific argument of a kernel.
Calls clSetKernelArg.
kernel
- theOpenCL
kernel.arg_index
- the kernel argument index.arg_ptr
- pointer to the data for the argument atarg_index
.
returns an empty Result or the error code from the OpenCL
C API function.
§Safety
This function is unsafe because arg must match the kernel argument.