GCCompEnv.java 783 B

123456789101112131415161718192021222324252627282930313233343536
  1. package com.oblivm.backend.gc;
  2. import com.oblivm.backend.flexsc.CompEnv;
  3. import com.oblivm.backend.flexsc.Mode;
  4. import com.oblivm.backend.flexsc.Party;
  5. import com.oblivm.backend.network.Network;
  6. public abstract class GCCompEnv extends CompEnv<GCSignal> {
  7. public GCCompEnv(Network channel, Party p, Mode mode) {
  8. super(channel, p, mode);
  9. }
  10. public GCSignal ONE() {
  11. return new GCSignal(true);
  12. }
  13. public GCSignal ZERO() {
  14. return new GCSignal(false);
  15. }
  16. public GCSignal[] newTArray(int len) {
  17. return new GCSignal[len];
  18. }
  19. public GCSignal[][] newTArray(int d1, int d2) {
  20. return new GCSignal[d1][d2];
  21. }
  22. public GCSignal[][][] newTArray(int d1, int d2, int d3) {
  23. return new GCSignal[d1][d2][d3];
  24. }
  25. public GCSignal newT(boolean v) {
  26. return new GCSignal(v);
  27. }
  28. }