ok
This commit is contained in:
parent
bf2426f3cd
commit
91e34c6fb4
@ -57,7 +57,7 @@ struct TrainParam{
|
||||
opt_dense_col = 1.0f;
|
||||
nthread = 0;
|
||||
size_leaf_vector = 0;
|
||||
parallel_option = 0;
|
||||
parallel_option = 2;
|
||||
}
|
||||
/*!
|
||||
* \brief set parameters from outside
|
||||
|
||||
@ -418,7 +418,11 @@ class ColMaker: public IUpdater {
|
||||
#if defined(_OPENMP)
|
||||
const int batch_size = std::max(static_cast<int>(nsize / this->nthread / 32), 1);
|
||||
#endif
|
||||
if (param.parallel_option == 0) {
|
||||
int poption = param.parallel_option;
|
||||
if (poption == 2) {
|
||||
poption = nsize * 2 < nthread ? 1 : 0;
|
||||
}
|
||||
if (poption == 0) {
|
||||
#pragma omp parallel for schedule(dynamic, batch_size)
|
||||
for (bst_omp_uint i = 0; i < nsize; ++i) {
|
||||
const bst_uint fid = batch.col_index[i];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user