[Openmp-commits] [PATCH] D99447: [OpenMP] Define omp_is_initial_device() variants in omp.h

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sat Apr 3 01:09:58 PDT 2021


JonChesterfield added a comment.

Nice, thanks! I think the function in the devicertl is dead with this change, maybe remove that too?



================
Comment at: openmp/runtime/src/include/omp.h.var:479
+#   endif
+
 #   undef __KAI_KMPC_CONVENTION
----------------
jdoerfert wrote:
> hbae wrote:
> > jdoerfert wrote:
> > > Do we want them to be static? I would have expected odr linkage instead.
> > > 
> > > 
> > > 
> > Current clang fails to link two files that include omp.h, so I think we need static here.
> I would expect this to cause "unused function" warnings if you include omp.h.
> That said, given that clang might be the only impl. so far for begin/end declare variant and it doesn't warn, we can go ahead.
'inline' is right for c++. Inline plus instantiation in library code right for c. Can we hit linkonce_odr from a clang attribute?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99447



More information about the Openmp-commits mailing list