Function ocl_core::set_kernel_arg
source · pub fn set_kernel_arg(
kernel: &Kernel,
index: u32,
arg_val: ArgVal<'_>
) -> OclCoreResult<()>
Expand description
Sets the argument value for the kernel argument at index
.
Example:
ⓘ
let kernel = core::create_kernel(&program, "multiply")?;
core::set_kernel_arg(&kernel, 0, ArgVal::scalar(&10.0f32))?;
core::set_kernel_arg(&kernel, 1, ArgVal::mem(&buffer))?;