[Openmp-commits] [PATCH] D47709: [OMPT] Fix OMPT callbacks for the taskloop construct and add testcase

Simon Convent via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Jun 6 05:30:36 PDT 2018


sconvent added inline comments.


================
Comment at: runtime/src/kmp_tasking.cpp:3955
   ompt_task_info_t *task_info = __ompt_get_task_info_object(0);
+  kmp_uint64 iteration_count = *lb < *ub ? *ub - *lb + 1 : *lb - *ub + 1;
   if (ompt_enabled.ompt_callback_work) {
----------------
AndreyChurbanov wrote:
> protze.joachim wrote:
> > Shouldn't there be st(ride) in the formula?
> Why not use calculated below iterations count - tc?  It is computed at lines 3980 - 3995, including the check against zero.
There is a difference between the iteration count and the task count.
>From the spec (TR6 page 423):
> For a taskloop construct, count represents the number of iterations in the iteration space, which may be the result of collapsing several associated loops.

`tc` seems to be the task count, not the iteration count. And st(ride) is not needed for the calculation of the iteration count, right?


https://reviews.llvm.org/D47709





More information about the Openmp-commits mailing list