Refactor DMatrix to return batches of different page types (#4686)
* Use explicit template parameter for specifying page type.
This commit is contained in:
@@ -63,7 +63,7 @@ TEST(SparsePage, PushCSCAfterTranspose) {
|
||||
CreateSparsePageDMatrix(n_entries, 64UL, filename);
|
||||
const int ncols = dmat->Info().num_col_;
|
||||
SparsePage page; // Consolidated sparse page
|
||||
for (const auto &batch : dmat->GetRowBatches()) {
|
||||
for (const auto &batch : dmat->GetBatches<xgboost::SparsePage>()) {
|
||||
// Transpose each batch and push
|
||||
SparsePage tmp = batch.GetTranspose(ncols);
|
||||
page.PushCSC(tmp);
|
||||
|
||||
Reference in New Issue
Block a user