summaryrefslogtreecommitdiffstats
path: root/openmp
diff options
context:
space:
mode:
Diffstat (limited to 'openmp')
-rw-r--r--openmp/runtime/src/kmp.h6
-rw-r--r--openmp/runtime/src/kmp_affinity.cpp6
-rw-r--r--openmp/runtime/src/kmp_global.c6
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;
OpenPOWER on IntegriCloud