| 140 | }; |
| 141 | |
| 142 | static void print_usage(int /*argc*/, char ** argv, rpc_server_params params) { |
| 143 | fprintf(stderr, "Usage: %s [options]\n\n", argv[0]); |
| 144 | fprintf(stderr, "options:\n"); |
| 145 | fprintf(stderr, " -h, --help show this help message and exit\n"); |
| 146 | fprintf(stderr, " -t, --threads number of threads for the CPU backend (default: %d)\n", params.n_threads); |
| 147 | fprintf(stderr, " -d DEV, --device device to use\n"); |
| 148 | fprintf(stderr, " -H HOST, --host HOST host to bind to (default: %s)\n", params.host.c_str()); |
| 149 | fprintf(stderr, " -p PORT, --port PORT port to bind to (default: %d)\n", params.port); |
| 150 | fprintf(stderr, " -m MEM, --mem MEM backend memory size (in MB)\n"); |
| 151 | fprintf(stderr, " -c, --cache enable local file cache\n"); |
| 152 | fprintf(stderr, "\n"); |
| 153 | } |
| 154 | |
| 155 | static bool rpc_server_params_parse(int argc, char ** argv, rpc_server_params & params) { |
| 156 | std::string arg; |
no test coverage detected