use omp parallel sortting

This commit is contained in:
tqchen 2014-04-30 09:48:41 -07:00
parent bbd952a021
commit ab0e7a3ddc

View File

@ -290,6 +290,7 @@ namespace xgboost{
} }
// sort columns // sort columns
unsigned ncol = static_cast<unsigned>(this->NumCol()); unsigned ncol = static_cast<unsigned>(this->NumCol());
#pragma omp parallel for schedule(static)
for (unsigned i = 0; i < ncol; i++){ for (unsigned i = 0; i < ncol; i++){
std::sort(&col_data_[col_ptr_[i]], &col_data_[col_ptr_[i + 1]], REntry::cmp_fvalue); std::sort(&col_data_[col_ptr_[i]], &col_data_[col_ptr_[i + 1]], REntry::cmp_fvalue);
} }