[Openmp-commits] [openmp] r231773 - changed unsigned types to signed - caused by comments of Hal Finkel on one of earlier patches

Andrey Churbanov Andrey.Churbanov at intel.com
Tue Mar 10 02:00:36 PDT 2015


Author: achurbanov
Date: Tue Mar 10 04:00:36 2015
New Revision: 231773

URL: http://llvm.org/viewvc/llvm-project?rev=231773&view=rev
Log:
changed unsigned types to signed - caused by comments of Hal Finkel on one of earlier patches

Modified:
    openmp/trunk/runtime/src/kmp.h
    openmp/trunk/runtime/src/kmp_affinity.cpp
    openmp/trunk/runtime/src/kmp_global.c

Modified: openmp/trunk/runtime/src/kmp.h
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp.h?rev=231773&r1=231772&r2=231773&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp.h (original)
+++ openmp/trunk/runtime/src/kmp.h Tue Mar 10 04:00:36 2015
@@ -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;
 
 /* ------------------------------------------------------------------------ */
 /* ------------------------------------------------------------------------ */

Modified: openmp/trunk/runtime/src/kmp_affinity.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_affinity.cpp?rev=231773&r1=231772&r2=231773&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_affinity.cpp (original)
+++ openmp/trunk/runtime/src/kmp_affinity.cpp Tue Mar 10 04:00:36 2015
@@ -3351,7 +3351,7 @@ __kmp_apply_thread_places(AddrUnsPair **
     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 **
     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++;
                     }

Modified: openmp/trunk/runtime/src/kmp_global.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_global.c?rev=231773&r1=231772&r2=231773&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_global.c (original)
+++ openmp/trunk/runtime/src/kmp_global.c Tue Mar 10 04:00:36 2015
@@ -253,9 +253,9 @@ kmp_nested_proc_bind_t __kmp_nested_proc
 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;
 





More information about the Openmp-commits mailing list