Remove accidental SparsePage copies (#3583)
This commit is contained in:
committed by
Philip Hyunsu Cho
parent
0b607fb884
commit
645996b12f
@@ -67,7 +67,7 @@ void SimpleDMatrix::MakeOneBatch(SparsePage* pcol, bool sorted) {
|
||||
|
||||
iter->BeforeFirst();
|
||||
while (iter->Next()) {
|
||||
auto batch = iter->Value();
|
||||
auto &batch = iter->Value();
|
||||
#pragma omp parallel for schedule(static)
|
||||
for (long i = 0; i < static_cast<long>(batch.Size()); ++i) { // NOLINT(*)
|
||||
int tid = omp_get_thread_num();
|
||||
|
||||
@@ -185,7 +185,7 @@ void SparsePageDMatrix::InitColAccess(
|
||||
|
||||
while (true) {
|
||||
if (batch_ptr != batch_top) {
|
||||
auto batch = iter->Value();
|
||||
auto &batch = iter->Value();
|
||||
CHECK_EQ(batch_top, batch.Size());
|
||||
for (size_t i = batch_ptr; i < batch_top; ++i) {
|
||||
auto ridx = static_cast<bst_uint>(batch.base_rowid + i);
|
||||
|
||||
Reference in New Issue
Block a user