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

Method read_domain_size

Compiler/program.py:914–931  ·  view source on GitHub ↗
(cls, program)

Source from the content-addressed store, hash-verified

912
913 @classmethod
914 def read_domain_size(cls, program):
915 schedule = cls.read_schedule(program)
916 try:
917 domain = schedule[6]
918 t, n = domain.split(':')
919 n = int(n)
920 if t == "R" and n <= 32:
921 return 4
922 elif n:
923 return (n + 63) // 64
924 except:
925 pass
926 from Compiler.instructions import reqbl_class
927 tapename = schedule[2].strip().split(":")[0]
928 for inst in Tape.read_instructions(tapename):
929 if inst.code == reqbl_class.code:
930 bl = inst.args[0]
931 return (abs(bl.i) + 63) // 64 * 8
932
933 def reading(self, concept, reference, part=None):
934 key = concept, reference, part

Callers 1

memory-usage.pyFile · 0.80

Calls 4

absFunction · 0.85
read_scheduleMethod · 0.80
read_instructionsMethod · 0.80
splitMethod · 0.45

Tested by

no test coverage detected