summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src/kmp_affinity.cpp
diff options
context:
space:
mode:
authorAndrey Churbanov <Andrey.Churbanov@intel.com>2015-01-27 16:52:57 +0000
committerAndrey Churbanov <Andrey.Churbanov@intel.com>2015-01-27 16:52:57 +0000
commit7daf9803f52427743bf09b128480f295077b3b52 (patch)
tree7342712fa2caa8e1431f39008a2b119aca8ab0e7 /openmp/runtime/src/kmp_affinity.cpp
parent42a79217a85cbd0c968ff80123e9202dc1849a01 (diff)
downloadbcm5719-llvm-7daf9803f52427743bf09b128480f295077b3b52.tar.gz
bcm5719-llvm-7daf9803f52427743bf09b128480f295077b3b52.zip
Replaces KMP_OS_WINDOWS && KMP_ARCH_X86_64 or any combination of those two options with the feature macro KMP_GROUP_AFFINITY.
llvm-svn: 227199
Diffstat (limited to 'openmp/runtime/src/kmp_affinity.cpp')
-rw-r--r--openmp/runtime/src/kmp_affinity.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/openmp/runtime/src/kmp_affinity.cpp b/openmp/runtime/src/kmp_affinity.cpp
index a9338c29747..f3d0a8ce7f5 100644
--- a/openmp/runtime/src/kmp_affinity.cpp
+++ b/openmp/runtime/src/kmp_affinity.cpp
@@ -85,7 +85,7 @@ __kmp_affinity_entire_machine_mask(kmp_affin_mask_t *mask)
{
KMP_CPU_ZERO(mask);
-# if KMP_OS_WINDOWS && KMP_ARCH_X86_64
+# if KMP_GROUP_AFFINITY
if (__kmp_num_proc_groups > 1) {
int group;
@@ -100,7 +100,7 @@ __kmp_affinity_entire_machine_mask(kmp_affin_mask_t *mask)
}
else
-# endif /* KMP_OS_WINDOWS && KMP_ARCH_X86_64 */
+# endif /* KMP_GROUP_AFFINITY */
{
int proc;
@@ -641,7 +641,7 @@ __kmp_affinity_create_flat_map(AddrUnsPair **address2os,
}
-# if KMP_OS_WINDOWS && KMP_ARCH_X86_64
+# if KMP_GROUP_AFFINITY
//
// If multiple Windows* OS processor groups exist, we can create a 2-level
@@ -723,7 +723,7 @@ __kmp_affinity_create_proc_group_map(AddrUnsPair **address2os,
return 2;
}
-# endif /* KMP_OS_WINDOWS && KMP_ARCH_X86_64 */
+# endif /* KMP_GROUP_AFFINITY */
# if KMP_ARCH_X86 || KMP_ARCH_X86_64
@@ -3541,7 +3541,7 @@ __kmp_aux_affinity_initialize(void)
# endif /* KMP_OS_LINUX */
-# if KMP_OS_WINDOWS && KMP_ARCH_X86_64
+# if KMP_GROUP_AFFINITY
if ((depth < 0) && (__kmp_num_proc_groups > 1)) {
if (__kmp_affinity_verbose) {
@@ -3552,7 +3552,7 @@ __kmp_aux_affinity_initialize(void)
KMP_ASSERT(depth != 0);
}
-# endif /* KMP_OS_WINDOWS && KMP_ARCH_X86_64 */
+# endif /* KMP_GROUP_AFFINITY */
if (depth < 0) {
if (__kmp_affinity_verbose && (msg_id != kmp_i18n_null)) {
@@ -3678,7 +3678,7 @@ __kmp_aux_affinity_initialize(void)
}
}
-# if KMP_OS_WINDOWS && KMP_ARCH_X86_64
+# if KMP_GROUP_AFFINITY
else if (__kmp_affinity_top_method == affinity_top_method_group) {
if (__kmp_affinity_verbose) {
@@ -3693,7 +3693,7 @@ __kmp_aux_affinity_initialize(void)
}
}
-# endif /* KMP_OS_WINDOWS && KMP_ARCH_X86_64 */
+# endif /* KMP_GROUP_AFFINITY */
else if (__kmp_affinity_top_method == affinity_top_method_flat) {
if (__kmp_affinity_verbose) {
@@ -4019,7 +4019,7 @@ __kmp_affinity_set_init_mask(int gtid, int isa_root)
{
if ((__kmp_affinity_type == affinity_none) || (__kmp_affinity_type == affinity_balanced)
) {
-# if KMP_OS_WINDOWS && KMP_ARCH_X86_64
+# if KMP_GROUP_AFFINITY
if (__kmp_num_proc_groups > 1) {
return;
}
@@ -4038,7 +4038,7 @@ __kmp_affinity_set_init_mask(int gtid, int isa_root)
else {
if ((! isa_root)
|| (__kmp_nested_proc_bind.bind_types[0] == proc_bind_false)) {
-# if KMP_OS_WINDOWS && KMP_ARCH_X86_64
+# if KMP_GROUP_AFFINITY
if (__kmp_num_proc_groups > 1) {
return;
}
@@ -4206,11 +4206,11 @@ __kmp_aux_set_affinity(void **mask)
KMP_FATAL(AffinityInvalidMask, "kmp_set_affinity");
}
-# if KMP_OS_WINDOWS && KMP_ARCH_X86_64
+# if KMP_GROUP_AFFINITY
if (__kmp_get_proc_group((kmp_affin_mask_t *)(*mask)) < 0) {
KMP_FATAL(AffinityInvalidMask, "kmp_set_affinity");
}
-# endif /* KMP_OS_WINDOWS && KMP_ARCH_X86_64 */
+# endif /* KMP_GROUP_AFFINITY */
}
}
OpenPOWER on IntegriCloud