forked from OSchip/llvm-project
[libomptarget][nvptx] Bug fix: Correctly identify the warp master active thread.
llvm-svn: 327556
This commit is contained in:
parent
4e6b822cdc
commit
59be4b434f
|
@ -37,7 +37,8 @@ __device__ static bool IsWarpMasterActiveThread() {
|
|||
unsigned long long Mask = getActiveThreadsMask();
|
||||
unsigned long long ShNum = WARPSIZE - (getThreadId() % WARPSIZE);
|
||||
unsigned long long Sh = Mask << ShNum;
|
||||
return Sh == 0;
|
||||
// Truncate Sh to the 32 lower bits
|
||||
return (unsigned)Sh == 0;
|
||||
}
|
||||
// Return true if this is the master thread.
|
||||
__device__ static bool IsMasterThread() {
|
||||
|
|
Loading…
Reference in New Issue