diff options
author | Andrey Churbanov <Andrey.Churbanov@intel.com> | 2015-01-27 16:50:31 +0000 |
---|---|---|
committer | Andrey Churbanov <Andrey.Churbanov@intel.com> | 2015-01-27 16:50:31 +0000 |
commit | 42a79217a85cbd0c968ff80123e9202dc1849a01 (patch) | |
tree | 874a6796161eff318b2f55fd86590f5fd95dd4c5 /openmp/runtime/src/kmp_runtime.c | |
parent | 086cbc37ad6603458040c2d28af122cf6c52b818 (diff) | |
download | bcm5719-llvm-42a79217a85cbd0c968ff80123e9202dc1849a01.tar.gz bcm5719-llvm-42a79217a85cbd0c968ff80123e9202dc1849a01.zip |
Fixed implementation of the teams construct in case it contains parallel regions with different number of threads.
llvm-svn: 227198
Diffstat (limited to 'openmp/runtime/src/kmp_runtime.c')
-rw-r--r-- | openmp/runtime/src/kmp_runtime.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/openmp/runtime/src/kmp_runtime.c b/openmp/runtime/src/kmp_runtime.c index 7d8554ed2e3..dd53dcd19b8 100644 --- a/openmp/runtime/src/kmp_runtime.c +++ b/openmp/runtime/src/kmp_runtime.c @@ -2046,7 +2046,12 @@ __kmp_join_call(ident_t *loc, int gtid int old_num = master_th->th.th_team_nproc; int new_num = master_th->th.th_teams_size.nth; kmp_info_t **other_threads = team->t.t_threads; + kmp_task_team_t * task_team = master_th->th.th_task_team; team->t.t_nproc = new_num; + if ( task_team ) { // task team might have lesser value of counters + task_team->tt.tt_ref_ct = new_num - 1; + task_team->tt.tt_unfinished_threads = new_num; + } for ( i = 0; i < old_num; ++i ) { other_threads[i]->th.th_team_nproc = new_num; } |