[Openmp-commits] [PATCH] D66672: [OPENMP][NVPTX]Add __kmpc_syncwarp(int32_t) function.

Alexey Bataev via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Aug 26 10:34:46 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rGda8b5cc9f138: [OPENMP][NVPTX]Add __kmpc_syncwarp(int32_t) function. (authored by ABataev).

Changed prior to commit:
  https://reviews.llvm.org/D66672?vs=216932&id=217197#toc

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D66672

Files:
  openmp/libomptarget/deviceRTLs/nvptx/src/interface.h
  openmp/libomptarget/deviceRTLs/nvptx/src/sync.cu
  openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.h


Index: openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.h
===================================================================
--- openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.h
+++ openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.h
@@ -38,4 +38,6 @@
 
 INLINE int __kmpc_impl_popc(uint32_t x) { return __popc(x); }
 
+INLINE void __kmpc_impl_syncwarp(int32_t Mask) { __SYNCWARP(Mask); }
+
 #endif
Index: openmp/libomptarget/deviceRTLs/nvptx/src/sync.cu
===================================================================
--- openmp/libomptarget/deviceRTLs/nvptx/src/sync.cu
+++ openmp/libomptarget/deviceRTLs/nvptx/src/sync.cu
@@ -11,6 +11,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "omptarget-nvptx.h"
+#include "target_impl.h"
 
 ////////////////////////////////////////////////////////////////////////////////
 // KMP Ordered calls
@@ -144,3 +145,12 @@
   PRINT0(LD_IO, "call __kmpc_warp_active_thread_mask\n");
   return __ACTIVEMASK();
 }
+
+////////////////////////////////////////////////////////////////////////////////
+// Syncwarp
+////////////////////////////////////////////////////////////////////////////////
+
+EXTERN void __kmpc_syncwarp(int32_t Mask) {
+  PRINT0(LD_IO, "call __kmpc_syncwarp\n");
+  __kmpc_impl_syncwarp(Mask);
+}
Index: openmp/libomptarget/deviceRTLs/nvptx/src/interface.h
===================================================================
--- openmp/libomptarget/deviceRTLs/nvptx/src/interface.h
+++ openmp/libomptarget/deviceRTLs/nvptx/src/interface.h
@@ -423,6 +423,8 @@
 
 // vote
 EXTERN int32_t __kmpc_warp_active_thread_mask();
+// syncwarp
+EXTERN void __kmpc_syncwarp(int32_t);
 
 // tasks
 EXTERN kmp_TaskDescr *__kmpc_omp_task_alloc(kmp_Ident *loc,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66672.217197.patch
Type: text/x-patch
Size: 1768 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20190826/6d90f71f/attachment-0001.bin>


More information about the Openmp-commits mailing list