diff --git a/src/assets/fc.circom b/src/assets/fc.circom index 8c75ef5..35e5d31 100644 --- a/src/assets/fc.circom +++ b/src/assets/fc.circom @@ -1,5 +1,20 @@ pragma circom 2.0.0; +template Switcher() { + signal input sel; + signal input L; + signal input R; + signal output outL; + signal output outR; + + signal aux; + + aux <== (R-L)*sel; // We create aux in order to have only one multiplication + outL <== aux + L; + outR <== -aux + R; +} + + template fc (width, height) { signal input in[width]; signal input weights[height][width];