diff options
author | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2015-09-21 17:24:46 +0000 |
---|---|---|
committer | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2015-09-21 17:24:46 +0000 |
commit | 441f33769eeae58532bb5e7f79c2d755ea984272 (patch) | |
tree | d1f9691d2b7243a7aac699e81138075d22145fac /openmp/runtime/src/kmp_barrier.cpp | |
parent | 7d8e7bd7b5aa6d0b4b4c469e0581d407c6205134 (diff) | |
download | bcm5719-llvm-441f33769eeae58532bb5e7f79c2d755ea984272.tar.gz bcm5719-llvm-441f33769eeae58532bb5e7f79c2d755ea984272.zip |
Fix the OpenMP 3.0 build
This change adds guards to the code in places where they are missing to enable
the OpenMP 3.0 build.
Patch by Diego Caballero and Johnny Peyton
Mailing List: http://lists.llvm.org/pipermail/openmp-dev/2015-September/000935.html
llvm-svn: 248178
Diffstat (limited to 'openmp/runtime/src/kmp_barrier.cpp')
-rw-r--r-- | openmp/runtime/src/kmp_barrier.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/openmp/runtime/src/kmp_barrier.cpp b/openmp/runtime/src/kmp_barrier.cpp index c2f26fde797..505daec8795 100644 --- a/openmp/runtime/src/kmp_barrier.cpp +++ b/openmp/runtime/src/kmp_barrier.cpp @@ -735,9 +735,11 @@ __kmp_hierarchical_barrier_gather(enum barrier_type bt, kmp_info_t *this_thr, register kmp_uint64 new_state; int level = team->t.t_level; +#if OMP_40_ENABLED if (other_threads[0]->th.th_teams_microtask) // are we inside the teams construct? if (this_thr->th.th_teams_size.nteams > 1) ++level; // level was not increased in teams construct for team_of_masters +#endif if (level == 1) thr_bar->use_oncore_barrier = 1; else thr_bar->use_oncore_barrier = 0; // Do not use oncore barrier when nested @@ -908,12 +910,14 @@ __kmp_hierarchical_barrier_release(enum barrier_type bt, kmp_info_t *this_thr, i } int level = team->t.t_level; +#if OMP_40_ENABLED if (team->t.t_threads[0]->th.th_teams_microtask ) { // are we inside the teams construct? if (team->t.t_pkfn != (microtask_t)__kmp_teams_master && this_thr->th.th_teams_level == level) ++level; // level was not increased in teams construct for team_of_workers if( this_thr->th.th_teams_size.nteams > 1 ) ++level; // level was not increased in teams construct for team_of_masters } +#endif if (level == 1) thr_bar->use_oncore_barrier = 1; else thr_bar->use_oncore_barrier = 0; // Do not use oncore barrier when nested nproc = this_thr->th.th_team_nproc; |