You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
326 B

  1. function calc(h) {
  2. var res[3];
  3. for (var i=0; i<3; i++) res[i] = h[i]*2;
  4. return res;
  5. }
  6. template Test() {
  7. signal input in[3];
  8. signal output out[3];
  9. var cout[3] = calc(in);
  10. for (var i=0; i<3; i++) out[i] <-- cout[i];
  11. for (var i=0; i<3; i++) out[i] === in[i]*2;
  12. }
  13. component main = Test();