Files
MP-SPDZ/Programs/Source/gc_and.mpc

27 lines
363 B
Plaintext

from Compiler.GC.types import sbits, sbit, cbits
import random
n = 4096
m = 1
if len(program.args) > 1:
n = int(program.args[1])
if len(program.args) > 2:
m = int(program.args[2])
pack = min(n, 50)
n = (n + pack - 1) // pack
a = sbit(1)
b = sbit(1, n=pack)
start_timer(1)
@for_range(m)
def f(_):
for i in range(n):
a * b
stop_timer(1)