Macro terminate

Source
terminate!() { /* proc-macro */ }
Expand description

Terminate the execution of the kernel for the current unit.

This terminates the execution of the unit even if nested inside many functions.

ยงExample

#use cubecl_macros::cube;
#[cube]
fn stop_if_more_than_ten(input: u32)  {
    if input > 10 {
        terminate!();
    }
}