[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
Fri Aug 23 13:04:08 PDT 2019
ABataev updated this revision to Diff 216932.
ABataev added a comment.
Added target specific __kmpc_impl_syncwarp() function.
Repository:
rOMP OpenMP
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66672/new/
https://reviews.llvm.org/D66672
Files:
libomptarget/deviceRTLs/nvptx/src/interface.h
libomptarget/deviceRTLs/nvptx/src/sync.cu
libomptarget/deviceRTLs/nvptx/src/target_impl.h
Index: libomptarget/deviceRTLs/nvptx/src/target_impl.h
===================================================================
--- libomptarget/deviceRTLs/nvptx/src/target_impl.h
+++ 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: libomptarget/deviceRTLs/nvptx/src/sync.cu
===================================================================
--- libomptarget/deviceRTLs/nvptx/src/sync.cu
+++ 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: libomptarget/deviceRTLs/nvptx/src/interface.h
===================================================================
--- libomptarget/deviceRTLs/nvptx/src/interface.h
+++ 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.216932.patch
Type: text/x-patch
Size: 1705 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20190823/8820a877/attachment.bin>
More information about the Openmp-commits
mailing list