mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-13 03:03:05 +00:00
fix
This commit is contained in:
parent
c664eba3e6
commit
2d9f8d9719
@ -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();
|
||||
|
||||
@ -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] =
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user