move nthread to local var
This commit is contained in:
parent
28128a1b6e
commit
70219ee1ae
@ -26,13 +26,14 @@ class TreeRefresher: public IUpdater {
|
||||
virtual void Update(const std::vector<bst_gpair> &gpair,
|
||||
IFMatrix *p_fmat,
|
||||
const BoosterInfo &info,
|
||||
const std::vector<RegTree*> &trees) {
|
||||
const std::vector<RegTree*> &trees) {
|
||||
if (trees.size() == 0) return;
|
||||
// number of threads
|
||||
// thread temporal space
|
||||
std::vector< std::vector<TStats> > stemp;
|
||||
std::vector<RegTree::FVec> fvec_temp;
|
||||
// setup temp space for each thread
|
||||
int nthread;
|
||||
#pragma omp parallel
|
||||
{
|
||||
nthread = omp_get_num_threads();
|
||||
@ -126,8 +127,6 @@ class TreeRefresher: public IUpdater {
|
||||
this->Refresh(gstats, tree[nid].cright(), p_tree);
|
||||
}
|
||||
}
|
||||
// number of thread in the data
|
||||
int nthread;
|
||||
// training parameter
|
||||
TrainParam param;
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user