Function fold_left

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

Execute the left fold operation.

evals is treated as a matrix with 1 << log_query_size rows and each column is dot-producted with the corresponding query element. The results is written to the output slice of packed values. If the function returns Ok(()), then out can be safely interpreted as initialized.

Please note that this method is single threaded. Currently we always have some parallelism above this level, so it’s not a problem. Having no parallelism inside allows us to use more efficient optimizations for special cases. If we ever need a parallel version of this function, we can implement it separately.