Changing omp_get_num_threads to omp_get_max_threads (#1831)

* Updating dmlc-core

* Changing omp_get_num_threads to omp_get_max_threads
This commit is contained in:
Simon DENEL
2016-12-04 20:26:45 +01:00
committed by Tianqi Chen
parent 47ba2de7d4
commit 7078c41dad
10 changed files with 22 additions and 71 deletions

View File

@@ -282,11 +282,7 @@ XGB_DLL int XGDMatrixCreateFromCSCEx(const size_t* col_ptr,
std::unique_ptr<data::SimpleCSRSource> source(new data::SimpleCSRSource());
API_BEGIN();
int nthread;
#pragma omp parallel
{
nthread = omp_get_num_threads();
}
const int nthread = omp_get_max_threads();
data::SimpleCSRSource& mat = *source;
common::ParallelGroupBuilder<RowBatch::Entry> builder(&mat.row_ptr_, &mat.row_data_);
builder.InitBudget(0, nthread);