Skip to main content

relu_alloc

Function relu_alloc 

Source
pub fn relu_alloc(input: &[f32]) -> Vec<f32>
Expand description

ReLU with output allocation. Avoids zero-fill overhead of vec![0.0; n].

ยงSafety guarantee

Output Vec is fully initialized by the SIMD/scalar loop before return.