Skip to main content

write_i32_arg

Function write_i32_arg 

Source
pub unsafe fn write_i32_arg(
    params: &CUDA_KERNEL_NODE_PARAMS,
    idx: usize,
    val: i32,
)
Expand description

Overwrite one i32 scalar argument in the node’s driver-owned kernelParams staging. idx is the kernel’s parameter position (launch_builder arg order). The write alone does NOT reach the exec — call set_exec_params after editing to push the change.

§Safety

idx must be a valid parameter index for the node’s kernel and that parameter must be a 4-byte scalar; writing a wrong slot corrupts the launch.