| 8 | }; |
| 9 | |
| 10 | inline void showHelp(char *argv[]) { |
| 11 | std::cout << "Usage: " << argv[0] << " [OPTIONS]" << std::endl << std::endl; |
| 12 | |
| 13 | std::cout << "Options:" << std::endl; |
| 14 | std::cout << "--onnx_model <string> Path to the ONNX model. " |
| 15 | "(Either onnx_model or trt_model must be provided)" |
| 16 | << std::endl; |
| 17 | std::cout << "--trt_model <string> Path to the TensorRT model. " |
| 18 | "(Either onnx_model or trt_model must be provided)" |
| 19 | << std::endl; |
| 20 | |
| 21 | std::cout << "Example usage:" << std::endl; |
| 22 | std::cout << argv[0] << " --onnx_model model.onnx" << std::endl; |
| 23 | }; |
| 24 | |
| 25 | inline bool tryGetNextArgument(int argc, char *argv[], int ¤tIndex, std::string &value, std::string flag, bool printErrors = true) { |
| 26 | if (currentIndex + 1 >= argc) { |