[Openmp-commits] [PATCH] D32496: Fix Hwloc API Incompatibility
Andrey Churbanov via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Apr 25 10:42:28 PDT 2017
AndreyChurbanov added inline comments.
================
Comment at: runtime/src/kmp.h:91
# include "hwloc.h"
+# if HWLOC_API_VERSION < 0x00010a00
+# define HWLOC_OBJ_NUMANODE HWLOC_OBJ_NODE
----------------
Both HWLOC 1.10 and 1.10.1 have version 0x00010a00; in 10.0 there is no HWLOC_OBJ_NUMANODE definition, but in 10.1 this definition is provided in deprecate.h header file (probably as a preparation for future renaming?).
Is it safer to use:
#ifndef HWLOC_OBJ_NUMANODE
#define HWLOC_OBJ_NUMANODE HWLOC_OBJ_NODE
#endif
#ifndef HWLOC_OBJ_PACKAGE
#define HWLOC_OBJ_PACKAGE HWLOC_OBJ_SOCKET
#endif
as opposed to version checking?
Repository:
rL LLVM
https://reviews.llvm.org/D32496
More information about the Openmp-commits
mailing list