Skip to main content

l2_f16

Function l2_f16 

Source
pub fn l2_f16<Idx: Copy + Ord>(
    x_idx: &[Idx],
    x_val: &[Half],
    y_idx: &[Idx],
    y_val: &[Half],
) -> Result<f32, LengthMismatch>
Expand description

sqrt(Σ (x_i − y_i)²) for f16 operands; values are pre-widened to f32, then reuse the f32 union merge.