aboutsummaryrefslogtreecommitdiff
path: root/openmp/runtime/src/kmp_affinity.cpp
diff options
context:
space:
mode:
authorJonathan Peyton <jonathan.l.peyton@intel.com>2021-12-14 08:32:22 +0100
committerSylvestre Ledru <sylvestre@debian.org>2021-12-14 08:33:05 +0100
commit9769340905d0033727817a3b0e4aef0b3863c964 (patch)
tree5dbc61979e2609be96716301427a5e09670ceb80 /openmp/runtime/src/kmp_affinity.cpp
parent7787a8f1b7077d9efb53f5023fe044b70ad527b4 (diff)
downloadllvm-9769340905d0033727817a3b0e4aef0b3863c964.zip
llvm-9769340905d0033727817a3b0e4aef0b3863c964.tar.gz
llvm-9769340905d0033727817a3b0e4aef0b3863c964.tar.bz2
[OpenMP][libomp] Fix compile errors with new KMP_HW_SUBSET changes
Add missing guards around x86-specific code. Reviewed By: kaz7 Differential Revision: https://reviews.llvm.org/D115664
Diffstat (limited to 'openmp/runtime/src/kmp_affinity.cpp')
-rw-r--r--openmp/runtime/src/kmp_affinity.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/openmp/runtime/src/kmp_affinity.cpp b/openmp/runtime/src/kmp_affinity.cpp
index 639f5d4..d0c0549 100644
--- a/openmp/runtime/src/kmp_affinity.cpp
+++ b/openmp/runtime/src/kmp_affinity.cpp
@@ -1104,10 +1104,12 @@ bool kmp_topology_t::filter_hw_subset() {
struct core_type_indexer {
int operator()(const kmp_hw_thread_t &t) const {
switch (t.attrs.get_core_type()) {
+#if KMP_ARCH_X86 || KMP_ARCH_X86_64
case KMP_HW_CORE_TYPE_ATOM:
return 1;
case KMP_HW_CORE_TYPE_CORE:
return 2;
+#endif
case KMP_HW_CORE_TYPE_UNKNOWN:
return 0;
}