diff options
author | Gheorghe-Teodor Bercea <gheorghe-teod.bercea@ibm.com> | 2019-01-09 18:30:14 +0000 |
---|---|---|
committer | Gheorghe-Teodor Bercea <gheorghe-teod.bercea@ibm.com> | 2019-01-09 18:30:14 +0000 |
commit | abb31f1d1f9ca986221662a9436332458b66cafb (patch) | |
tree | f3401890d7f7cf06eca5b13786b89c58f63d4448 /libomptarget/deviceRTLs/nvptx/src/libcall.cu | |
parent | 766c19dcb029b3cb0cde0d5475b4ded4bc1b2df6 (diff) |
[OpenMP][libomptarget] Use shared memory variable for tracking parallel level
Summary: Replace existing infrastructure for tracking parallel level using global memory with a per-team shared memory variable. This minimizes the impact of the overhead of tracking the parallel level for non-nested cases.
Reviewers: ABataev, caomhin
Reviewed By: ABataev
Subscribers: guansong, openmp-commits
Differential Revision: https://reviews.llvm.org/D55773
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@350747 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'libomptarget/deviceRTLs/nvptx/src/libcall.cu')
-rw-r--r-- | libomptarget/deviceRTLs/nvptx/src/libcall.cu | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libomptarget/deviceRTLs/nvptx/src/libcall.cu b/libomptarget/deviceRTLs/nvptx/src/libcall.cu index 9abe599..63bf6b4 100644 --- a/libomptarget/deviceRTLs/nvptx/src/libcall.cu +++ b/libomptarget/deviceRTLs/nvptx/src/libcall.cu @@ -165,7 +165,7 @@ EXTERN int omp_get_level(void) { if (isRuntimeUninitialized()) { ASSERT0(LT_FUSSY, isSPMDMode(), "Expected SPMD mode only with uninitialized runtime."); - return omptarget_nvptx_simpleThreadPrivateContext->GetParallelLevel(); + return parallelLevel; } int level = 0; omptarget_nvptx_TaskDescr *currTaskDescr = |