From 2d5f362c6a92a39e4ed66d8b461a03fab3a1bd97 Mon Sep 17 00:00:00 2001 From: Nicholas Ward Date: Thu, 26 Aug 2021 14:27:42 -0700 Subject: [PATCH] fixes --- src/gates/switch.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/gates/switch.rs b/src/gates/switch.rs index 5ffc6525..506911e5 100644 --- a/src/gates/switch.rs +++ b/src/gates/switch.rs @@ -72,7 +72,7 @@ impl, const D: usize, const CHUNK_SIZE: usize> Gate let mut constraints = Vec::with_capacity(self.num_constraints()); for c in 0..self.num_copies { - let switch_bool = vars.local_wires[Self::wire_switch_bool(self.num_wires(), c)]; + let switch_bool = vars.local_wires[Self::wire_switch_bool(self.num_copies, c)]; let not_switch = F::Extension::ONE - switch_bool; for e in 0..CHUNK_SIZE { @@ -234,12 +234,8 @@ impl, const D: usize, const CHUNK_SIZE: usize> SimpleGenerator< for e in 0..CHUNK_SIZE { let first_input = get_local_wire(SwitchGate::::wire_first_input(c, e)); - let second_input = - get_local_wire(SwitchGate::::wire_second_input(c, e)); let first_output = get_local_wire(SwitchGate::::wire_first_output(c, e)); - let second_output = - get_local_wire(SwitchGate::::wire_second_output(c, e)); if first_input == first_output { out_buffer.set_wire(switch_bool_wire, F::ONE);