Skip to content

Commit

Permalink
[OpenMP] [CUDA] Expose teamid to the debug path
Browse files Browse the repository at this point in the history
Summary: Small bug fix for debug build. A previous fix causing trouble for debug build.

Reviewers: grokos

Reviewed By: grokos

Subscribers: openmp-commits

Tags: #openmp

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

llvm-svn: 335046
  • Loading branch information
guansong committed Jun 19, 2018
1 parent 0461393 commit f9e56e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openmp/libomptarget/deviceRTLs/nvptx/src/loop.cu
Expand Up @@ -334,11 +334,11 @@ public:
else
__kmpc_barrier(loc, threadId);
// save sched state
int teamId = GetOmpTeamId();
omptarget_nvptx_threadPrivateContext->ScheduleType(tid) = schedule;
if (GetThreadIdInBlock() == 0) {
if (chunk < 1)
chunk = 1;
int teamId = GetOmpTeamId();
omptarget_nvptx_threadPrivateContext->Chunk(teamId) = chunk;
omptarget_nvptx_threadPrivateContext->LoopUpperBound(teamId) = ub;
omptarget_nvptx_threadPrivateContext->NextLowerBound(teamId) = lb;
Expand Down

0 comments on commit f9e56e5

Please sign in to comment.