summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src
diff options
context:
space:
mode:
authorJonathan Peyton <jonathan.l.peyton@intel.com>2016-10-07 18:01:35 +0000
committerJonathan Peyton <jonathan.l.peyton@intel.com>2016-10-07 18:01:35 +0000
commita1234cf28085ff797fd082a466efaa7e80325d26 (patch)
tree14417ce7456b38f40005c2ded97aa36a23355a82 /openmp/runtime/src
parent4326c4ac8f72658ccd378d5abd569cc7004d3a9a (diff)
downloadbcm5719-llvm-a1234cf28085ff797fd082a466efaa7e80325d26.tar.gz
bcm5719-llvm-a1234cf28085ff797fd082a466efaa7e80325d26.zip
Enable omp_get_schedule() to return static steal type.
As the code is now, calling omp_get_schedule() when OMP_SCHEDULE=static_steal will cause an assert. llvm-svn: 283576
Diffstat (limited to 'openmp/runtime/src')
-rw-r--r--openmp/runtime/src/kmp.h6
-rw-r--r--openmp/runtime/src/kmp_runtime.c4
2 files changed, 6 insertions, 4 deletions
diff --git a/openmp/runtime/src/kmp.h b/openmp/runtime/src/kmp.h
index 6175e1f8bc0..203dd8ba2ce 100644
--- a/openmp/runtime/src/kmp.h
+++ b/openmp/runtime/src/kmp.h
@@ -288,8 +288,10 @@ typedef enum kmp_sched {
kmp_sched_upper_std = 5, // upper bound for standard schedules
kmp_sched_lower_ext = 100, // lower bound of Intel extension schedules
kmp_sched_trapezoidal = 101, // mapped to kmp_sch_trapezoidal (39)
-// kmp_sched_static_steal = 102, // mapped to kmp_sch_static_steal (44)
- kmp_sched_upper = 102,
+#if KMP_STATIC_STEAL_ENABLED
+ kmp_sched_static_steal = 102, // mapped to kmp_sch_static_steal (44)
+#endif
+ kmp_sched_upper,
kmp_sched_default = kmp_sched_static // default scheduling
} kmp_sched_t;
#endif
diff --git a/openmp/runtime/src/kmp_runtime.c b/openmp/runtime/src/kmp_runtime.c
index 847f9be8ede..0e9e2c87eef 100644
--- a/openmp/runtime/src/kmp_runtime.c
+++ b/openmp/runtime/src/kmp_runtime.c
@@ -2766,11 +2766,11 @@ __kmp_get_schedule( int gtid, kmp_sched_t * kind, int * chunk )
case kmp_sch_trapezoidal:
*kind = kmp_sched_trapezoidal;
break;
-/*
+#if KMP_STATIC_STEAL_ENABLED
case kmp_sch_static_steal:
*kind = kmp_sched_static_steal;
break;
-*/
+#endif
default:
KMP_FATAL( UnknownSchedulingType, th_type );
}
OpenPOWER on IntegriCloud