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

Method Fetch

src/data/sparse_page_source.h:604–616  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

602class SortedCSCPageSource : public PageSourceIncMixIn<SortedCSCPage> {
603 protected:
604 void Fetch() final {
605 if (!this->ReadCache()) {
606 auto const& csr = this->source_->Page();
607 this->page_.reset(new SortedCSCPage{});
608 // we might be able to optimize this by merging transpose and pushcsc
609 this->page_->PushCSC(csr->GetTranspose(n_features_, nthreads_));
610 CHECK_EQ(this->page_->Size(), n_features_);
611 CHECK_EQ(this->page_->data.Size(), csr->data.Size());
612 this->page_->SortRows(this->nthreads_);
613 page_->SetBaseRowId(csr->base_rowid);
614 this->WriteCache();
615 }
616 }
617
618 public:
619 SortedCSCPageSource(float missing, int nthreads, bst_feature_t n_features, uint32_t n_batches,

Callers 1

SortedCSCPageSourceMethod · 0.95

Calls 9

ReadCacheMethod · 0.80
PushCSCMethod · 0.80
GetTransposeMethod · 0.80
SortRowsMethod · 0.80
WriteCacheMethod · 0.80
PageMethod · 0.45
resetMethod · 0.45
SizeMethod · 0.45
SetBaseRowIdMethod · 0.45

Tested by

no test coverage detected