MCPcopy Create free account
hub / github.com/dmlc/xgboost / SaveToLocalFile

Method SaveToLocalFile

src/data/simple_dmatrix.cc:360–367  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

358}
359
360void SimpleDMatrix::SaveToLocalFile(const std::string& fname) {
361 std::unique_ptr<dmlc::Stream> fo(dmlc::Stream::Create(fname.c_str(), "w"));
362 int tmagic = kMagic;
363 fo->Write(tmagic);
364 info_.SaveBinary(fo.get());
365 fo->Write(sparse_page_->offset.HostVector());
366 fo->Write(sparse_page_->data.HostVector());
367}
368
369#define INSTANTIATE_SDCTOR(__ADAPTER_T) \
370 template SimpleDMatrix::SimpleDMatrix(__ADAPTER_T* adapter, float missing, std::int32_t nthread, \

Callers 2

XGDMatrixSaveBinaryFunction · 0.80
TESTFunction · 0.80

Calls 4

c_strMethod · 0.80
SaveBinaryMethod · 0.80
WriteMethod · 0.45
getMethod · 0.45

Tested by 1

TESTFunction · 0.64