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

Method read_raw

llama.cpp:893–905  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

891 }
892
893 void read_raw(void * ptr, size_t len) const {
894 if (len == 0) {
895 return;
896 }
897 errno = 0;
898 std::size_t ret = std::fread(ptr, len, 1, fp);
899 if (ferror(fp)) {
900 throw std::runtime_error(format("read error: %s", strerror(errno)));
901 }
902 if (ret != 1) {
903 throw std::runtime_error(std::string("unexpectedly reached end of file"));
904 }
905 }
906
907 uint32_t read_u32() const {
908 uint32_t ret;

Callers 2

load_data_forMethod · 0.45

Calls 2

formatFunction · 0.70
stringFunction · 0.50

Tested by

no test coverage detected