[Openmp-commits] [PATCH] D46840: [OpenMP][libomptarget] Add function for checking SPMD mode
Gheorghe-Teodor Bercea via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Mon May 14 12:24:44 PDT 2018
gtbercea updated this revision to Diff 146653.
gtbercea added a comment.
Use int8_t instead of bool type.
Repository:
rOMP OpenMP
https://reviews.llvm.org/D46840
Files:
libomptarget/deviceRTLs/nvptx/src/interface.h
libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu
Index: libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu
===================================================================
--- libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu
+++ 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();
+}
Index: libomptarget/deviceRTLs/nvptx/src/interface.h
===================================================================
--- libomptarget/deviceRTLs/nvptx/src/interface.h
+++ 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46840.146653.patch
Type: text/x-patch
Size: 962 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20180514/02a26f64/attachment.bin>
More information about the Openmp-commits
mailing list