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

Method write_raw

llama.cpp:913–922  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

911 }
912
913 void write_raw(const void * ptr, size_t len) const {
914 if (len == 0) {
915 return;
916 }
917 errno = 0;
918 size_t ret = std::fwrite(ptr, len, 1, fp);
919 if (ret != 1) {
920 throw std::runtime_error(format("write error: %s", strerror(errno)));
921 }
922 }
923
924 void write_u32(std::uint32_t val) const {
925 write_raw(&val, sizeof(val));

Callers 2

writeMethod · 0.45
llama_save_session_fileFunction · 0.45

Calls 1

formatFunction · 0.70

Tested by

no test coverage detected