mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-02-17 20:33:12 +00:00
Minor
This commit is contained in:
parent
847565a8c3
commit
19cbbd4d12
@ -20,8 +20,16 @@ pub(crate) struct SelectorsInfo {
|
||||
/// Partition the gates into (the smallest amount of) groups `{ G_i }`, such that for each group `G`
|
||||
/// `|G| + max_{g in G} g.degree() <= max_degree`. These groups are constructed greedily from
|
||||
/// the list of gates sorted by degree.
|
||||
/// We build a selector polynomial `S_i` for each group `G_i`, with
|
||||
/// ```
|
||||
/// S_i[j] =
|
||||
/// if j-th row gate=g_k in G_i
|
||||
/// k
|
||||
/// else
|
||||
/// UNUSED_SELECTOR
|
||||
/// ```
|
||||
pub(crate) fn selector_polynomials<F: RichField + Extendable<D>, const D: usize>(
|
||||
gates: Vec<GateRef<F, D>>,
|
||||
gates: &[GateRef<F, D>],
|
||||
instances: &[GateInstance<F, D>],
|
||||
max_degree: usize,
|
||||
) -> (Vec<PolynomialValues<F>>, SelectorsInfo) {
|
||||
|
||||
@ -667,11 +667,8 @@ impl<F: RichField + Extendable<D>, const D: usize> CircuitBuilder<F, D> {
|
||||
let quotient_degree_factor = self.config.max_quotient_degree_factor;
|
||||
let mut gates = self.gates.iter().cloned().collect::<Vec<_>>();
|
||||
gates.sort_unstable_by_key(|g| (g.0.degree(), g.0.id()));
|
||||
let (mut constant_vecs, selectors_info) = selector_polynomials(
|
||||
gates.clone(),
|
||||
&self.gate_instances,
|
||||
quotient_degree_factor + 1,
|
||||
);
|
||||
let (mut constant_vecs, selectors_info) =
|
||||
selector_polynomials(&gates, &self.gate_instances, quotient_degree_factor + 1);
|
||||
constant_vecs.extend(self.constant_polys());
|
||||
let num_constants = constant_vecs.len();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user