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

Method read_raw

examples/export-lora/export-lora.cpp:68–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66 }
67
68 void read_raw(void * ptr, size_t size) {
69 if (size == 0) {
70 return;
71 }
72 errno = 0;
73 std::size_t ret = std::fread(ptr, size, 1, fp);
74 if (ferror(fp)) {
75 die_fmt("read error: %s", strerror(errno));
76 }
77 if (ret != 1) {
78 die("unexpectedly reached end of file");
79 }
80 }
81
82 std::uint32_t read_u32() {
83 std::uint32_t ret;

Callers 2

load_loraFunction · 0.45
export_loraFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected