Parses command line arguments.
()
| 45 | |
| 46 | |
| 47 | def parse_args(): |
| 48 | """Parses command line arguments.""" |
| 49 | parser = argparse.ArgumentParser() |
| 50 | parser.add_argument( |
| 51 | "--file_name", |
| 52 | type=str, |
| 53 | default="opencl_binary.bin", |
| 54 | help="The binary file name.") |
| 55 | parser.add_argument( |
| 56 | "--output_path", |
| 57 | type=str, |
| 58 | default="", |
| 59 | help="The path of generated C++ source file which contains the binary." |
| 60 | ) |
| 61 | parser.add_argument( |
| 62 | "--load_func_name", |
| 63 | type=str, |
| 64 | default="LoadData", |
| 65 | help="load interface name.") |
| 66 | parser.add_argument( |
| 67 | "--size_func_name", |
| 68 | type=str, |
| 69 | default="DataSize", |
| 70 | help="size function name.") |
| 71 | return parser.parse_known_args() |
| 72 | |
| 73 | |
| 74 | if __name__ == '__main__': |
no outgoing calls
no test coverage detected