[PATCH] D46840: [OpenMP][libomptarget] Add function for checking SPMD mode

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 15 08:20:27 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL332360: [OpenMP][libomptarget] Add function for checking SPMD mode (authored by gbercea, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D46840?vs=146653&id=146835#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D46840

Files:
  openmp/trunk/libomptarget/deviceRTLs/nvptx/src/interface.h
  openmp/trunk/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu


Index: openmp/trunk/libomptarget/deviceRTLs/nvptx/src/interface.h
===================================================================
--- openmp/trunk/libomptarget/deviceRTLs/nvptx/src/interface.h
+++ openmp/trunk/libomptarget/deviceRTLs/nvptx/src/interface.h
@@ -516,4 +516,7 @@
 EXTERN void *
 __kmpc_get_data_sharing_environment_frame(int32_t SourceThreadID,
                                           int16_t IsOMPRuntimeInitialized);
+
+// SPMD execution mode interrogation function.
+EXTERN int8_t __kmpc_is_spmd_exec_mode();
 #endif
Index: openmp/trunk/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu
===================================================================
--- openmp/trunk/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu
+++ openmp/trunk/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu
@@ -187,3 +187,8 @@
         omptarget_nvptx_threadPrivateContext);
   }
 }
+
+// Return true if the current target region is executed in SPMD mode.
+EXTERN int8_t __kmpc_is_spmd_exec_mode() {
+  return isSPMDMode();
+}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46840.146835.patch
Type: text/x-patch
Size: 1041 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180515/f86ff753/attachment.bin>


More information about the llvm-commits mailing list