6 parser
= argparse
.ArgumentParser()
7 parser
.add_argument('--max_args', type=int, help='Max number of arguments to generate case statements for', required
=True)
8 parser
.add_argument('--output', help='Output header file to include', required
=True)
9 args
= parser
.parse_args()
12 for i
in range(args
.max_args
+1):
13 output
+= 'case %d:\n'%(i)
14 output
+= '((void (*)(kmp_int32 *, kmp_int32 *\n'
19 output
+= '))fn)(&global_tid, &bound_tid\n'
21 output
+= ', args[%d]'%(j)
27 with
open(args
.output
, 'w') as f
:
30 if __name__
== "__main__":