Function ocl_core::set_kernel_arg [−][src]
pub fn set_kernel_arg(
kernel: &Kernel,
index: u32,
arg_val: ArgVal
) -> OclCoreResult<()>
Sets the argument value for the kernel argument at index
.
Example:
ⓘThis example is not tested
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))?;