[Openmp-commits] [PATCH] D71404: [libomptarget][nfc] Introduce atomic wrapper function

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Dec 12 15:51:22 PST 2019


jdoerfert added a comment.

In D71404#1782646 <https://reviews.llvm.org/D71404#1782646>, @JonChesterfield wrote:

> In D71404#1782271 <https://reviews.llvm.org/D71404#1782271>, @jdoerfert wrote:
>
> > I think it is worth having this layer of abstraction. Aren't there other atmomics except add?
>
>
> Yep. Complete list of functions used by the current deviceRTL is add, inc, max, exch, cas in a few integer variants. The others were left out for the (admittedly minor) reduction in work available from choosing a naming convention before the find&replace.
>
> I think I'd also prefer to have the abstraction layer. It's part of viewing common/ as C++ plus well defined extensions.


I would propose:

  Name them __kmpc_aotmic_XXX as that matches the runtime naming scheme. Changing it locally seems not helpful.
  Do the search and replace for this commit already, let's get all atomics moved in a single swoop.
  Consider a template solution for both the declaration and implementation. If we get more repetition and types it might be worth it. (At least hat is what I thought in D64217)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71404





More information about the Openmp-commits mailing list