Hi PA,

Paul-Antoine Arras:
For static-schedule worksharing loops (`omp for schedule(static)') the
compiler emits two separate calls -- omp_get_thread_num() and
omp_get_num_threads() -- to obtain the thread id and count.  Similarly,
for `omp distribute' constructs, it emits omp_get_team_num() and
omp_get_num_teams().  Because these are public OpenMP API routines, OMPT
cannot distinguish them from user-level queries.

Introduce two new libgomp entry points:

   - GOMP_loop_static_worksharing(): returns both the thread id and the thread
     count packed into an unsigned long long.
   - GOMP_distribute_static_worksharing(): same, but for team id and team
     count.

Using a single return value rather than two output-pointer arguments
preserves optimisations in later passes.

After some discussions with a couple of persons, I think it is easier to read and clearer to use "_Complex int" (complex_integer_type_node) instead of the 'long long int' + shift operations. Only down side is that that's a GNU extension.

Otherwise, it looks good to me.

Thanks,

Tobias

Reply via email to