[Openmp-commits] [PATCH] D23587: [OPENMP] Implementation of omp_get_default_device and omp_set_default_device

George Rokos via Openmp-commits openmp-commits at lists.llvm.org
Wed Aug 17 13:58:40 PDT 2016


grokos added a comment.

In https://reviews.llvm.org/D23587#517940, @Hahnfeld wrote:

> I imagine in the current state this will give linker errors with `liboffload` / `libomptarget` that define their own version of this function.


As discussed last week, libomptarget does not implement these two functions. The 4.0 standard mandates that the default device is set per-task. libomptarget (and liboffload as far as I understand) has no notion of tasks, so implementing those functions anywhere else than libomp would be problematic.


================
Comment at: runtime/src/kmp_ftn_entry.h:907
@@ -906,3 +906,3 @@
 
-#if KMP_MIC || KMP_OS_DARWIN || defined(KMP_STUB)
+#if KMP_MIC || KMP_OS_DARWIN
 
----------------
AndreyChurbanov wrote:
> Why KMP_STUB is removed here?  Empty routines should continue to work fine for the stubs library I think.
Right, I had misunderstood the role of KMP_STUB. I restored it and merged both versions of each routine into a single function, following the style of other API functions.


Repository:
  rL LLVM

https://reviews.llvm.org/D23587





More information about the Openmp-commits mailing list