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

Method write_raw

examples/export-lora/export-lora.cpp:94–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92 }
93
94 void write_raw(const void * ptr, size_t size) {
95 if (size == 0) {
96 return;
97 }
98 errno = 0;
99 size_t ret = std::fwrite(ptr, size, 1, fp);
100 if (ret != 1) {
101 die_fmt("write error: %s", strerror(errno));
102 }
103 }
104
105 void write_u32(std::uint32_t val) {
106 write_raw(&val, sizeof(val));

Callers 1

export_loraFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected