[Openmp-commits] [PATCH] D62332: Fixed build warning with -DLIBOMP_USE_HWLOC=1

Phabricator via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Jun 3 07:19:48 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL362401: Fixed build warning with -DLIBOMP_USE_HWLOC=1 (authored by achurbanov, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D62332?vs=201019&id=202719#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62332/new/

https://reviews.llvm.org/D62332

Files:
  openmp/trunk/runtime/src/kmp.h
  openmp/trunk/runtime/src/kmp_affinity.cpp


Index: openmp/trunk/runtime/src/kmp.h
===================================================================
--- openmp/trunk/runtime/src/kmp.h
+++ openmp/trunk/runtime/src/kmp.h
@@ -96,6 +96,12 @@
 #ifndef HWLOC_OBJ_PACKAGE
 #define HWLOC_OBJ_PACKAGE HWLOC_OBJ_SOCKET
 #endif
+#if HWLOC_API_VERSION >= 0x00020000
+// hwloc 2.0 changed type of depth of object from unsigned to int
+typedef int kmp_hwloc_depth_t;
+#else
+typedef unsigned int kmp_hwloc_depth_t;
+#endif
 #endif
 
 #if KMP_ARCH_X86 || KMP_ARCH_X86_64
Index: openmp/trunk/runtime/src/kmp_affinity.cpp
===================================================================
--- openmp/trunk/runtime/src/kmp_affinity.cpp
+++ openmp/trunk/runtime/src/kmp_affinity.cpp
@@ -457,7 +457,8 @@
 }
 
 static int __kmp_hwloc_count_children_by_depth(hwloc_topology_t t,
-                                               hwloc_obj_t o, unsigned depth,
+                                               hwloc_obj_t o,
+                                               kmp_hwloc_depth_t depth,
                                                hwloc_obj_t *f) {
   if (o->depth == depth) {
     if (*f == NULL)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62332.202719.patch
Type: text/x-patch
Size: 1145 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20190603/acc4dd56/attachment.bin>


More information about the Openmp-commits mailing list