[Openmp-commits] [PATCH] D95062: [libomptarget][devicertl][nfc] Simplify target_atomic abstraction
Alexey Bataev via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Jan 20 13:35:26 PST 2021
ABataev added a comment.
In D95062#2510863 <https://reviews.llvm.org/D95062#2510863>, @jdoerfert wrote:
> In D95062#2510856 <https://reviews.llvm.org/D95062#2510856>, @tianshilei1992 wrote:
>
>> None of the three atomic operations provided by OpenMP, `read`, `write`, and `update`, sound like similar semantics as the four operations here.
>
> Please finish reading the section about atomics (https://www.openmp.org/spec-html/5.1/openmpsu105.html#x138-1480002.19.7). All of the above operations are expressible, as far as I can tell.
> `add` and `inc` are `atomic update`, `exchange` is `atomic capture`, `max` and `cas` are `atomic compare`, all with appropriate expression statement following them.
AFAIK, atomic compare is a feature of 5.1, we have just read, write, update and capture.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95062/new/
https://reviews.llvm.org/D95062
More information about the Openmp-commits
mailing list