[Openmp-commits] [PATCH] D50188: [OpenMP][libomptarget] Simplify warp master selection for data sharing

Phabricator via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Sep 25 06:25:06 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rOMP342972: [OpenMP][libomptarget] Simplify warp master selection for data sharing (authored by gbercea, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D50188?vs=158755&id=166867#toc

Repository:
  rOMP OpenMP

https://reviews.llvm.org/D50188

Files:
  libomptarget/deviceRTLs/nvptx/src/data_sharing.cu


Index: libomptarget/deviceRTLs/nvptx/src/data_sharing.cu
===================================================================
--- libomptarget/deviceRTLs/nvptx/src/data_sharing.cu
+++ libomptarget/deviceRTLs/nvptx/src/data_sharing.cu
@@ -389,7 +389,7 @@
   void *&FrameP = DataSharingState.FramePtr[WID];
 
   // Only warp active master threads manage the stack.
-  if (IsWarpMasterActiveThread()) {
+  if (getThreadId() % WARPSIZE == 0) {
     // SlotP will point to either the shared memory slot or an existing
     // global memory slot.
     __kmpc_data_sharing_slot *&SlotP = DataSharingState.SlotPtr[WID];
@@ -468,7 +468,7 @@
     return omptarget_nvptx_SimpleThreadPrivateContext::Deallocate(FrameStart);
   }
 
-  if (IsWarpMasterActiveThread()) {
+  if (getThreadId() % WARPSIZE == 0) {
     unsigned WID = getWarpId();
 
     // Current slot


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50188.166867.patch
Type: text/x-patch
Size: 851 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20180925/fd9d3f87/attachment.bin>


More information about the Openmp-commits mailing list