From 9d2c1cf9f56242d5b36a15d8953f6be48b4b197c Mon Sep 17 00:00:00 2001 From: Tianqi Chen Date: Tue, 26 Aug 2014 19:59:55 -0700 Subject: [PATCH] add omp uint when openmp is not there --- src/utils/omp.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/utils/omp.h b/src/utils/omp.h index 81e493d90..0380ebd67 100644 --- a/src/utils/omp.h +++ b/src/utils/omp.h @@ -7,15 +7,6 @@ */ #if defined(_OPENMP) #include -namespace xgboost { -// loop variable used in openmp -#ifdef _MSC_VER -typedef int bst_omp_uint; -#else -typedef unsigned bst_omp_uint; -#endif -} // namespace xgboost - #else #ifndef DISABLE_OPENMP #ifndef _MSC_VER @@ -30,4 +21,14 @@ inline int omp_get_thread_num() { return 0; } inline int omp_get_num_threads() { return 1; } inline void omp_set_num_threads(int nthread) {} #endif + +// loop variable used in openmp +namespace xgboost { +#ifdef _MSC_VER +typedef int bst_omp_uint; +#else +typedef unsigned bst_omp_uint; +#endif +} // namespace xgboost + #endif // XGBOOST_UTILS_OMP_H_