[Openmp-commits] [PATCH] D61380: [OPENMP][NVPTX]Fix behavior of omp_in_parallel() function.

Jonas Hahnfeld via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed May 1 08:00:35 PDT 2019


Hahnfeld added a comment.

My understanding of `enclosed` is that its meaning is recursive. So `omp_in_parallel` is to return true iff (at least) one of the surrounding parallel regions is active. That also matches the summary in OpenMP 5.0 which says

> The omp_in_parallel routine returns true if the active-levels-var ICV is greater than zero; otherwise, it returns false.

and

> active-levels-var - the number of nested active parallel regions that enclose the current task such that all of the parallel regions are enclosed by the outermost initial task region on the current device. There is one copy of this ICV per data environment.

In that sense I think the test is currently right and the change is not compliant with the standard.


Repository:
  rOMP OpenMP

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61380/new/

https://reviews.llvm.org/D61380





More information about the Openmp-commits mailing list