Remove accidental SparsePage copies (#3583)

This commit is contained in:
Rory Mitchell
2018-08-13 12:49:38 +12:00
committed by Philip Hyunsu Cho
parent 0b607fb884
commit 645996b12f
16 changed files with 28 additions and 28 deletions

View File

@@ -155,7 +155,7 @@ class GBLinear : public GradientBooster {
auto iter = p_fmat->RowIterator();
iter->BeforeFirst();
while (iter->Next()) {
auto batch = iter->Value();
auto &batch = iter->Value();
// parallel over local batch
const auto nsize = static_cast<bst_omp_uint>(batch.Size());
#pragma omp parallel for schedule(static)
@@ -207,7 +207,7 @@ class GBLinear : public GradientBooster {
const int ngroup = model_.param.num_output_group;
preds.resize(p_fmat->Info().num_row_ * ngroup);
while (iter->Next()) {
auto batch = iter->Value();
auto &batch = iter->Value();
// output convention: nrow * k, where nrow is number of rows
// k is number of group
// parallel over local batch

View File

@@ -441,7 +441,7 @@ class Dart : public GBTree {
auto* self = static_cast<Derived*>(this);
iter->BeforeFirst();
while (iter->Next()) {
auto batch = iter->Value();
auto &batch = iter->Value();
// parallel over local batch
constexpr int kUnroll = 8;
const auto nsize = static_cast<bst_omp_uint>(batch.Size());