This commit is contained in:
wborgeaud 2021-07-23 17:38:24 +02:00
parent 5a16d7c555
commit 2ea35bd9e4
2 changed files with 2 additions and 0 deletions

View File

@ -10,6 +10,7 @@ use crate::target::Target;
use crate::vars::{EvaluationTargets, EvaluationVars, EvaluationVarsBase};
use crate::witness::PartialWitness;
/// Computes `sum alpha^i c_i` for a vector `c_i` of `num_coeffs` elements of the base field.
#[derive(Debug, Clone)]
pub struct ReducingGate<const D: usize> {
pub num_coeffs: usize,

View File

@ -92,6 +92,7 @@ impl<const D: usize> ReducingFactorTarget<D> {
Self { base, count: 0 }
}
/// Reduces a length `n` vector of `Target`s using `n/21` `ReducingGate`s (with 33 routed wires and 126 wires).
pub fn reduce_base<F>(
&mut self,
terms: &[Target],