7 parser
= argparse
.ArgumentParser()
11 help="Max number of arguments to generate case statements for",
14 parser
.add_argument("--output", help="Output header file to include", required
=True)
15 args
= parser
.parse_args()
18 for i
in range(args
.max_args
+ 1):
19 output
+= "case %d:\n" % (i
)
20 output
+= "((void (*)(kmp_int32 *, kmp_int32 *\n"
25 output
+= "))fn)(&global_tid, &bound_tid\n"
27 output
+= ", args[%d]" % (j
)
33 with
open(args
.output
, "w") as f
:
37 if __name__
== "__main__":