[MEM] Add rowset struct to save memory with billion level rows
This commit is contained in:
@@ -109,7 +109,7 @@ class GBLinear : public GradientBooster {
|
||||
|
||||
std::vector<bst_gpair> &gpair = *in_gpair;
|
||||
const int ngroup = model.param.num_output_group;
|
||||
const std::vector<bst_uint> &rowset = p_fmat->buffered_rowset();
|
||||
const RowSet &rowset = p_fmat->buffered_rowset();
|
||||
// for all the output group
|
||||
for (int gid = 0; gid < ngroup; ++gid) {
|
||||
double sum_grad = 0.0, sum_hess = 0.0;
|
||||
|
||||
@@ -325,7 +325,7 @@ class GBTree : public GradientBooster {
|
||||
int bst_group,
|
||||
const RegTree &new_tree,
|
||||
const int* leaf_position) {
|
||||
const std::vector<bst_uint>& rowset = p_fmat->buffered_rowset();
|
||||
const RowSet& rowset = p_fmat->buffered_rowset();
|
||||
const bst_omp_uint ndata = static_cast<bst_omp_uint>(rowset.size());
|
||||
#pragma omp parallel for schedule(static)
|
||||
for (bst_omp_uint i = 0; i < ndata; ++i) {
|
||||
|
||||
Reference in New Issue
Block a user