| 76 | } |
| 77 | |
| 78 | impl(const char * fname, const char * mode, [[maybe_unused]] const bool use_direct_io = false) { |
| 79 | fp = ggml_fopen(fname, mode); |
| 80 | if (fp == NULL) { |
| 81 | throw std::runtime_error(format("failed to open %s: %s", fname, strerror(errno))); |
| 82 | } |
| 83 | fp_win32 = (HANDLE) _get_osfhandle(_fileno(fp)); |
| 84 | seek(0, SEEK_END); |
| 85 | size = tell(); |
| 86 | seek(0, SEEK_SET); |
| 87 | } |
| 88 | |
| 89 | size_t tell() const { |
| 90 | LARGE_INTEGER li; |
nothing calls this directly
no test coverage detected