diff options
author | Andrey Churbanov <Andrey.Churbanov@intel.com> | 2015-03-10 09:00:36 +0000 |
---|---|---|
committer | Andrey Churbanov <Andrey.Churbanov@intel.com> | 2015-03-10 09:00:36 +0000 |
commit | 128755741f8d223777edfb77b70204314158d9b4 (patch) | |
tree | c5d4499d1bd670f228b776019b9f0ae024e7c79f /openmp/runtime/src | |
parent | 96f02da75a74bc9598fae129e74e945f43a294d3 (diff) | |
download | bcm5719-llvm-128755741f8d223777edfb77b70204314158d9b4.tar.gz bcm5719-llvm-128755741f8d223777edfb77b70204314158d9b4.zip |
changed unsigned types to signed - caused by comments of Hal Finkel on one of earlier patches
llvm-svn: 231773
Diffstat (limited to 'openmp/runtime/src')
-rw-r--r-- | openmp/runtime/src/kmp.h | 6 | ||||
-rw-r--r-- | openmp/runtime/src/kmp_affinity.cpp | 6 | ||||
-rw-r--r-- | openmp/runtime/src/kmp_global.c | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/openmp/runtime/src/kmp.h b/openmp/runtime/src/kmp.h index 0b863462072..e3c140172b1 100644 --- a/openmp/runtime/src/kmp.h +++ b/openmp/runtime/src/kmp.h @@ -792,9 +792,9 @@ typedef enum kmp_cancel_kind_t { } kmp_cancel_kind_t; #endif // OMP_40_ENABLED -extern unsigned int __kmp_place_num_cores; -extern unsigned int __kmp_place_num_threads_per_core; -extern unsigned int __kmp_place_core_offset; +extern int __kmp_place_num_cores; +extern int __kmp_place_num_threads_per_core; +extern int __kmp_place_core_offset; /* ------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------ */ diff --git a/openmp/runtime/src/kmp_affinity.cpp b/openmp/runtime/src/kmp_affinity.cpp index d767140aa4a..7f1a29d53f3 100644 --- a/openmp/runtime/src/kmp_affinity.cpp +++ b/openmp/runtime/src/kmp_affinity.cpp @@ -3351,7 +3351,7 @@ __kmp_apply_thread_places(AddrUnsPair **pAddr, int depth) if ( __kmp_place_num_threads_per_core == 0 ) { __kmp_place_num_threads_per_core = __kmp_nThreadsPerCore; // use all HW contexts } - if ( __kmp_place_core_offset + __kmp_place_num_cores > (unsigned int)nCoresPerPkg ) { + if ( __kmp_place_core_offset + __kmp_place_num_cores > nCoresPerPkg ) { KMP_WARNING( AffThrPlaceManyCores ); return; } @@ -3361,11 +3361,11 @@ __kmp_apply_thread_places(AddrUnsPair **pAddr, int depth) int i, j, k, n_old = 0, n_new = 0; for ( i = 0; i < nPackages; ++i ) { for ( j = 0; j < nCoresPerPkg; ++j ) { - if ( (unsigned int)j < __kmp_place_core_offset || (unsigned int)j >= __kmp_place_core_offset + __kmp_place_num_cores ) { + if ( j < __kmp_place_core_offset || j >= __kmp_place_core_offset + __kmp_place_num_cores ) { n_old += __kmp_nThreadsPerCore; // skip not-requested core } else { for ( k = 0; k < __kmp_nThreadsPerCore; ++k ) { - if ( (unsigned int)k < __kmp_place_num_threads_per_core ) { + if ( k < __kmp_place_num_threads_per_core ) { newAddr[n_new] = (*pAddr)[n_old]; // copy requested core' data to new location n_new++; } diff --git a/openmp/runtime/src/kmp_global.c b/openmp/runtime/src/kmp_global.c index f3d17c85a0f..261efc4e846 100644 --- a/openmp/runtime/src/kmp_global.c +++ b/openmp/runtime/src/kmp_global.c @@ -253,9 +253,9 @@ kmp_nested_proc_bind_t __kmp_nested_proc_bind = { NULL, 0, 0 }; int __kmp_affinity_num_places = 0; #endif -unsigned int __kmp_place_num_cores = 0; -unsigned int __kmp_place_num_threads_per_core = 0; -unsigned int __kmp_place_core_offset = 0; +int __kmp_place_num_cores = 0; +int __kmp_place_num_threads_per_core = 0; +int __kmp_place_core_offset = 0; kmp_tasking_mode_t __kmp_tasking_mode = tskm_task_teams; |