Model IO in JSON. (#5110)

This commit is contained in:
Jiaming Yuan
2019-12-11 11:20:40 +08:00
committed by GitHub
parent c7cc657a4d
commit 208ab3b1ff
25 changed files with 667 additions and 165 deletions

View File

@@ -115,7 +115,7 @@ std::string LoadSequentialFile(std::string fname) {
}
size_t f_size_bytes = fs.st_size;
buffer.resize(f_size_bytes+1);
buffer.resize(f_size_bytes + 1);
int32_t fd = open(fname.c_str(), O_RDONLY);
posix_fadvise(fd, 0, 0, POSIX_FADV_SEQUENTIAL);
ssize_t bytes_read = read(fd, &buffer[0], f_size_bytes);