[Openmp-commits] [PATCH] D68615: [libomptarget][nfc] Make interface.h target independent

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Oct 7 18:27:47 PDT 2019


jdoerfert added a comment.

I like that we start to extract common code out of `.../nvptx` but I'm confused on the how. As I mention below, I expected "all generic code" to include `target_impl.h` in order to avoid target specific code (here the `__device__` stuff) under guards. Maybe I miss something so please let me know what you think.

---

I was expecting something like:
`include/{interface.h, option.h, ...}` all contain an `#include "target_impl.h"` at the beginning (see below on two options for that).
Code like the `__kmpc_impl_lanemask_t` typedef and defines like `NOINLINE` are in this setup part of `target_impl.h`.



================
Comment at: openmp/libomptarget/deviceRTLs/include/interface.h:24
+typedef uint32_t __kmpc_impl_lanemask_t;
+#endif
 
----------------
I would have thought we include `target_impl.h` here to get the target specific stuff.
Either via
```
#ifdef __CUDACC__
#include "nvptx/target_impl.h"
#endif
```
or via cmake include path magic.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68615/new/

https://reviews.llvm.org/D68615





More information about the Openmp-commits mailing list