Skip to content

Commit

Permalink
Fix scan.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed May 26, 2019
1 parent e7630f0 commit 21d12ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/common/hist_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ void GHistIndexBlockMatrix::Init(const GHistIndexMatrix& gmat,
// scan row_ptr_offsets into pointer to blocks
std::vector<uint32_t> row_ptr_block_ptr(std::move(row_ptr_block_offsets));
for (uint32_t i = 1; i < row_ptr_block_ptr.size(); ++i) {
row_ptr_block_ptr[i] = row_ptr_block_ptr[i+1];
row_ptr_block_ptr[i] += row_ptr_block_ptr[i-1];
}

blocks_.resize(nblock);
Expand Down
6 changes: 4 additions & 2 deletions tests/benchmark/block_hist_init.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#include <xgboost/c_api.h>
#include <xgboost/logging.h>
#include <dmlc/parameter.h>
#include <dmlc/registry.h>

#include <xgboost/c_api.h>
#include <xgboost/logging.h>

#include "../../src/common/common.h"
#include "../../src/common/column_matrix.h"
#include "../../src/common/hist_util.h"
Expand Down

0 comments on commit 21d12ac

Please sign in to comment.