This is an archive of the discontinued LLVM Phabricator instance.

[libomptarget-nvptx] Fix number of threads in parallel
ClosedPublic

Authored by Hahnfeld on Sep 7 2018, 6:30 AM.

Details

Summary

If there is no num_threads() clause we must consider the
nthreads-var ICV. Its value is set by omp_set_num_threads()
and can be queried using omp_get_max_num_threads().
The rewritten code now closely resembles the algorithm given
in the OpenMP standard.

Diff Detail

Repository
rL LLVM

Event Timeline

Hahnfeld created this revision.Sep 7 2018, 6:30 AM
This revision is now accepted and ready to land.Sep 28 2018, 8:37 AM
This revision was automatically updated to reflect the committed changes.