pub fn segmented_reduce_sum(data: &[f64], flags: &[bool]) -> Vec<f64>
Segmented reduce: sum within each segment, returns one value per segment.