6 statements
= scop
['statements'];
7 numStatements
= len(statements
)
9 output
= "%s\n\n" % str(numStatements
)
11 for statement
in scop
['statements']:
12 output
+= "%s\n\n" % statement
['domain']
13 output
+= "0 0 0 # for future options\n\n"
18 def getSchedules(scop
):
19 statements
= scop
['statements'];
20 numStatements
= len(statements
)
22 output
= "%s\n\n" % str(numStatements
)
24 for statement
in scop
['statements']:
25 output
+= "%s\n\n" % statement
['schedule']
31 # ---------------------- CONTEXT ----------------------
34 # Context (no constraints on two parameters)
37 0 # We do not want to set manually the parameter names
39 # --------------------- STATEMENTS --------------------
42 0 # We do not want to set manually the iterator names
44 # --------------------- SCATTERING --------------------
47 0 # We do not want to set manually the schedule dimension names
50 context
= scop
['context']
51 domains
= getDomains(scop
)
52 schedules
= getSchedules(scop
)
53 print template
% (context
, domains
, schedules
)
56 description
= 'Translate JSCoP into iscc input'
57 parser
= argparse
.ArgumentParser(description
)
58 parser
.add_argument('inputFile', metavar
='N', type=file,
59 help='The JSCoP file')
61 args
= parser
.parse_args()
62 inputFile
= args
.inputFile
63 scop
= json
.load(inputFile
)