Skip to content

Commit d49ce7c

Browse files
author
Jonathan Peyton
committed
[OpenMP][libomp] Replace global variable references with local object
Remove references to global __kmp_topology within a kmp_topology_t object method. There should just be implicit references to the private object.
1 parent 9faab43 commit d49ce7c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

openmp/runtime/src/kmp_affinity.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ void kmp_topology_t::canonicalize() {
818818
// First try core, then thread, then package
819819
kmp_hw_t gran_types[3] = {KMP_HW_CORE, KMP_HW_THREAD, KMP_HW_SOCKET};
820820
for (auto g : gran_types) {
821-
if (__kmp_topology->get_equivalent_type(g) != KMP_HW_UNKNOWN) {
821+
if (get_equivalent_type(g) != KMP_HW_UNKNOWN) {
822822
gran_type = g;
823823
break;
824824
}
@@ -839,8 +839,8 @@ void kmp_topology_t::canonicalize() {
839839
// processor groups that cover a socket, then the runtime must
840840
// restrict the granularity down to the processor group level.
841841
if (__kmp_num_proc_groups > 1) {
842-
int gran_depth = __kmp_topology->get_level(gran_type);
843-
int proc_group_depth = __kmp_topology->get_level(KMP_HW_PROC_GROUP);
842+
int gran_depth = get_level(gran_type);
843+
int proc_group_depth = get_level(KMP_HW_PROC_GROUP);
844844
if (gran_depth >= 0 && proc_group_depth >= 0 &&
845845
gran_depth < proc_group_depth) {
846846
KMP_WARNING(AffGranTooCoarseProcGroup, "KMP_AFFINITY",

0 commit comments

Comments
 (0)