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

Method SparsePageSource

src/data/sparse_page_source.h:473–485  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

471
472 public:
473 SparsePageSource(DataIterProxy<DataIterResetCallback, XGDMatrixCallbackNext> iter,
474 DMatrixProxy* proxy, float missing, int nthreads, bst_feature_t n_features,
475 bst_idx_t n_batches, std::shared_ptr<Cache> cache)
476 : SparsePageSourceImpl(missing, nthreads, n_features, cache),
477 iter_{std::move(iter)},
478 proxy_{proxy},
479 n_batches_{n_batches} {
480 if (!cache_info_->written) {
481 iter_.Reset();
482 CHECK(iter_.Next()) << "Must have at least 1 batch.";
483 }
484 this->Fetch();
485 }
486
487 SparsePageSource& operator++() final {
488 TryLockGuard guard{single_threaded_};

Callers

nothing calls this directly

Calls 3

FetchMethod · 0.95
ResetMethod · 0.45
NextMethod · 0.45

Tested by

no test coverage detected