unrolled_binary_reduce

Function unrolled_binary_reduce 

Source
pub fn unrolled_binary_reduce<TI1, TI2, TS, I, F, FSum>(
    xs1: &[TI1],
    xs2: &[TI2],
    init: I,
    f: F,
    f_sum: FSum,
) -> TS
where TI1: Clone, TI2: Clone, TS: Clone, I: Fn() -> TS, F: Fn(TS, (TI1, TI2)) -> TS, FSum: Fn(TS, TS) -> TS,
Expand description

Fold over the manually unrolled xs1 and xs2 (binary inputs) with f.

This function does not check that the lengths of xs1 and xs2 are the same. The shorter one will determine the number of iterations.

ยงSee also

This code is from https://github.com/rust-ndarray/ndarray/blob/master/src/numeric_util.rs