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

Method read_raw

common/train.cpp:746–758  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

744 }
745
746 void read_raw(void * ptr, size_t size) {
747 if (size == 0) {
748 return;
749 }
750 errno = 0;
751 std::size_t ret = std::fread(ptr, size, 1, fp);
752 if (ferror(fp)) {
753 die_fmt("read error: %s", strerror(errno));
754 }
755 if (ret != 1) {
756 die("unexpectedly reached end of file");
757 }
758 }
759
760 std::uint32_t read_u32() {
761 std::uint32_t ret;

Callers 1

tokenize_fileFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected