From 5661a67d20b90f7c3c868cfa3ef313e684ce3b95 Mon Sep 17 00:00:00 2001 From: Rory Mitchell Date: Thu, 17 Aug 2017 17:14:39 +1200 Subject: [PATCH] Add parallel sort for MSVC (#2609) --- include/xgboost/base.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/xgboost/base.h b/include/xgboost/base.h index 9f54588c5..3497d19d7 100644 --- a/include/xgboost/base.h +++ b/include/xgboost/base.h @@ -55,6 +55,10 @@ #define XGBOOST_PARALLEL_SORT(X, Y, Z) __gnu_parallel::sort((X), (Y), (Z)) #define XGBOOST_PARALLEL_STABLE_SORT(X, Y, Z) \ __gnu_parallel::stable_sort((X), (Y), (Z)) +#elif defined(_MSC_VER) && (!__INTEL_COMPILER) +#include +#define XGBOOST_PARALLEL_SORT(X, Y, Z) concurrency::parallel_sort((X), (Y), (Z)) +#define XGBOOST_PARALLEL_STABLE_SORT(X, Y, Z) std::stable_sort((X), (Y), (Z)) #else #define XGBOOST_PARALLEL_SORT(X, Y, Z) std::sort((X), (Y), (Z)) #define XGBOOST_PARALLEL_STABLE_SORT(X, Y, Z) std::stable_sort((X), (Y), (Z))