[Openmp-commits] [PATCH] D44793: Fixed __kmpc_get_target_offload() to call initialization.

Phabricator via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Mar 22 11:56:13 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL328228: Fixed __kmpc_get_target_offload() to call library initialization. (authored by achurbanov, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D44793?vs=139470&id=139489#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D44793

Files:
  openmp/trunk/runtime/src/kmp_csupport.cpp


Index: openmp/trunk/runtime/src/kmp_csupport.cpp
===================================================================
--- openmp/trunk/runtime/src/kmp_csupport.cpp
+++ openmp/trunk/runtime/src/kmp_csupport.cpp
@@ -4066,7 +4066,12 @@
 #endif
 
 #if OMP_50_ENABLED
-int __kmpc_get_target_offload(void) { return __kmp_target_offload; }
+int __kmpc_get_target_offload(void) {
+  if (!__kmp_init_serial) {
+    __kmp_serial_initialize();
+  }
+  return __kmp_target_offload;
+}
 #endif // OMP_50_ENABLED
 
 // end of file //


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44793.139489.patch
Type: text/x-patch
Size: 519 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20180322/d77fa172/attachment.bin>


More information about the Openmp-commits mailing list