This commit is contained in:
Nicholas Ward 2021-10-29 16:03:58 -07:00
parent c664eba3e6
commit 2d9f8d9719
2 changed files with 3 additions and 5 deletions

View File

@ -72,9 +72,7 @@ impl<F: RichField + Extendable<D>, const D: usize> CircuitBuilder<F, D> {
let chunk_size = a1.len();
let (gate, gate_index, mut next_copy) = self.find_switch_gate(chunk_size);
let num_copies = gate.num_copies;
let (gate, gate_index, next_copy) = self.find_switch_gate(chunk_size);
let mut c = Vec::new();
let mut d = Vec::new();

View File

@ -822,7 +822,7 @@ impl<F: RichField + Extendable<D>, const D: usize> CircuitBuilder<F, D> {
]);
}
let (gate, gate_index, mut next_copy) =
let (gate, gate_index, next_copy) =
match self.batched_gates.current_switch_gates[chunk_size - 1].clone() {
None => {
let gate = SwitchGate::<F, D>::new_from_config(self.config.clone(), chunk_size);
@ -834,7 +834,7 @@ impl<F: RichField + Extendable<D>, const D: usize> CircuitBuilder<F, D> {
let num_copies = gate.num_copies;
if next_copy == num_copies {
if next_copy == num_copies - 1 {
self.batched_gates.current_switch_gates[chunk_size - 1] = None;
} else {
self.batched_gates.current_switch_gates[chunk_size - 1] =