[libomptarget-nvptx] Fix ancestor_thread_num and team_size (non-SPMD)
authorJonas Hahnfeld <hahnjo@hahnjo.de>
Sun, 30 Sep 2018 09:23:14 +0000 (09:23 +0000)
committerJonas Hahnfeld <hahnjo@hahnjo.de>
Sun, 30 Sep 2018 09:23:14 +0000 (09:23 +0000)
commit067235f227f541816af8aa777bdf1b214c22c77b
tree5717e386498b1de893360e84c905d21a4d4cdd53
parent9be3b6a18b2926692d3a734d74174bda9419bd7a
[libomptarget-nvptx] Fix ancestor_thread_num and team_size (non-SPMD)

According to OpenMP 4.5, p250:12-14:

    If the requested nest level is outside the range of 0 and the
    nest level of the current thread, as returned by the omp_get_level
    routine, the routine returns -1.

The SPMD code path will need a similar fix.

Differential Revision: https://reviews.llvm.org/D51787

llvm-svn: 343401
openmp/libomptarget/deviceRTLs/nvptx/src/libcall.cu
openmp/libomptarget/deviceRTLs/nvptx/test/parallel/level.c