[Openmp-commits] [PATCH] D76713: [libomptarget][nfc] Explicitly static function scope shared variables

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Mar 24 12:21:41 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG0813f41005fd: [libomptarget][nfc] Explicitly static function scope shared variables (authored by JonChesterfield).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76713/new/

https://reviews.llvm.org/D76713

Files:
  openmp/libomptarget/deviceRTLs/common/src/reduction.cu


Index: openmp/libomptarget/deviceRTLs/common/src/reduction.cu
===================================================================
--- openmp/libomptarget/deviceRTLs/common/src/reduction.cu
+++ openmp/libomptarget/deviceRTLs/common/src/reduction.cu
@@ -230,7 +230,7 @@
                           : /*Master thread only*/ 1;
   uint32_t TeamId = GetBlockIdInKernel();
   uint32_t NumTeams = GetNumberOfBlocksInKernel();
-  SHARED volatile bool IsLastTeam;
+  static SHARED volatile bool IsLastTeam;
 
   // Team masters of all teams write to the scratchpad.
   if (ThreadId == 0) {
@@ -423,8 +423,8 @@
                          : /*Master thread only*/ 1;
   uint32_t TeamId = GetBlockIdInKernel();
   uint32_t NumTeams = GetNumberOfBlocksInKernel();
-  SHARED unsigned Bound;
-  SHARED unsigned ChunkTeamCount;
+  static SHARED unsigned Bound;
+  static SHARED unsigned ChunkTeamCount;
 
   // Block progress for teams greater than the current upper
   // limit. We always only allow a number of teams less or equal


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76713.252391.patch
Type: text/x-patch
Size: 1015 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20200324/938a4a10/attachment.bin>


More information about the Openmp-commits mailing list