Function fold_middle

Source
pub fn fold_middle<P, PE>(
    evals: &[P],
    log_evals_size: usize,
    query: &[PE],
    log_query_size: usize,
    start_index: usize,
    out: &mut [MaybeUninit<PE>],
) -> Result<(), Error>
where P: PackedField, PE: PackedField<Scalar: ExtensionField<P::Scalar>>,
Expand description

Execute the middle fold operation.

Every consequent 1 << start_index scalar values are considered as a row. Then each column is dot-producted in chunks (of size 1 << log_query_size) with the query slice. The results are written to the output.

Please note that this method is single threaded. Currently we always have some parallelism above this level, so it’s not a problem.