MCPcopy Create free account
hub / github.com/data61/MP-SPDZ / process

Function process

Scripts/memory-usage.py:18–26  ·  view source on GitHub ↗
(tapename, res, regs)

Source from the content-addressed store, hash-verified

16thread_regs = collections.defaultdict(lambda: 0)
17
18def process(tapename, res, regs):
19 for inst in Tape.read_instructions(tapename):
20 t = inst.type
21 if issubclass(t, DirectMemoryInstruction):
22 res[type(inst.args[0])] = max(inst.args[1].i + inst.size,
23 res[type(inst.args[0])]) + 1
24 for arg in inst.args:
25 if isinstance(arg, RegisterArgFormat):
26 regs[type(arg)] = max(regs[type(arg)], arg.i + inst.size)
27
28try:
29 tapes = Program.read_tapes(sys.argv[1])

Callers 1

memory-usage.pyFile · 0.70

Calls 2

maxFunction · 0.85
read_instructionsMethod · 0.80

Tested by

no test coverage detected