add tmp file

This commit is contained in:
tqchen
2014-09-12 15:52:39 -07:00
parent 87cc53f0cd
commit 3a0be47b1c
4 changed files with 30 additions and 11 deletions

View File

@@ -214,10 +214,13 @@ class DMatrixPageBase : public DataMatrix {
/*! \brief load and initialize the iterator with fi */
inline void Load(utils::FileStream &fi,
bool silent = false,
const char *fname = NULL) {
const char *fname = NULL,
bool skip_magic_check = false) {
int tmagic;
utils::Check(fi.Read(&tmagic, sizeof(tmagic)) != 0, "invalid input file format");
utils::Check(tmagic == magic, "invalid format,magic number mismatch");
if (!skip_magic_check) {
utils::Check(tmagic == magic, "invalid format,magic number mismatch");
}
this->info.LoadBinary(fi);
iter_->Load(fi);
if (!silent) {