[Openmp-commits] [PATCH] D43308: [OMPT] Fix parallel_data in implicit barrier-end
Joachim Protze via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Sat Feb 17 08:41:18 PST 2018
protze.joachim added inline comments.
================
Comment at: runtime/src/kmp_barrier.cpp:1892
- : &(this_thr->th.ompt_thread_info.task_data);
- this_thr->th.ompt_thread_info.state = omp_state_overhead;
#if OMPT_OPTIONAL
----------------
Hahnfeld wrote:
> protze.joachim wrote:
> > Please keep that one and remove the duplikate at the end of the block, including the comment.
> >
> > You can add a comment here, that this state change is important for the algorithm described in runtime/src/kmp_wait_release.h:161
> I'm not sure I understand your reasoning here: There is no intervening call to `__kmp_wait_template` inside this OMPT block so I don't think there is an observable difference except the state during the callback.
The reasoning for having the status change here is independent of the changed comment. `omp_state_wait_barrier_implicit` should indicate, that the thread is actually waiting in the barrier. Calling the callback functions is more the overhead kind of state, so I would prefer to keep the state change here and remove the redundant assignment below.
The comment below is wrong anyway.
Repository:
rOMP OpenMP
https://reviews.llvm.org/D43308
More information about the Openmp-commits
mailing list