Files
MP-SPDZ/Programs/Source/gc_and.mpc
2022-10-31 12:48:59 +11:00

27 lines
370 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.get_type(pack)(1)
start_timer(1)
@for_range(m)
def f(_):
for i in range(n):
a * b
stop_timer(1)