MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / main

Function main

examples/gguf/gguf.cpp:230–249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228}
229
230int main(int argc, char ** argv) {
231 if (argc < 3) {
232 printf("usage: %s data.gguf r|w\n", argv[0]);
233 return -1;
234 }
235
236 const std::string fname(argv[1]);
237 const std::string mode (argv[2]);
238
239 GGML_ASSERT((mode == "r" || mode == "w") && "mode must be r or w");
240
241 if (mode == "w") {
242 GGML_ASSERT(gguf_ex_write(fname) && "failed to write gguf file");
243 } else if (mode == "r") {
244 GGML_ASSERT(gguf_ex_read_0(fname) && "failed to read gguf file");
245 GGML_ASSERT(gguf_ex_read_1(fname) && "failed to read gguf file");
246 }
247
248 return 0;
249}

Callers

nothing calls this directly

Calls 4

printfFunction · 0.85
gguf_ex_writeFunction · 0.70
gguf_ex_read_0Function · 0.70
gguf_ex_read_1Function · 0.70

Tested by

no test coverage detected