[libomptarget][nfc] Introduce atomic wrapper function
authorJon Chesterfield <jonathanchesterfield@gmail.com>
Wed, 18 Dec 2019 20:06:16 +0000 (20:06 +0000)
committerJon Chesterfield <jonathanchesterfield@gmail.com>
Wed, 18 Dec 2019 20:06:17 +0000 (20:06 +0000)
commit2caeaf2f455db468cc5a5505d90b4919ae37c915
treebf88173057103f8b7418c7b545198a4a6ddeab67
parent3db1cf7a1e6731a02b475bdda05ea2d38f3e5ea8
[libomptarget][nfc] Introduce atomic wrapper function

Summary:
[libomptarget][nfc] Introduce atomic wrapper function

Wraps atomic functions in a template prefixed __kmpc_atomic that
dispatches to cuda or hip atomic functions. Intended to be easily extended
to dispatch to OpenCL or C++ atomics for a third target.

Reviewers: ABataev, jdoerfert, grokos

Reviewed By: jdoerfert

Subscribers: Anastasia, jvesely, mgrang, dexonsmith, llvm-commits, mgorny, jfb, openmp-commits

Tags: #openmp, #llvm

Differential Revision: https://reviews.llvm.org/D71404
openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
openmp/libomptarget/deviceRTLs/common/omptargeti.h
openmp/libomptarget/deviceRTLs/common/src/libcall.cu
openmp/libomptarget/deviceRTLs/common/src/loop.cu
openmp/libomptarget/deviceRTLs/common/src/reduction.cu
openmp/libomptarget/deviceRTLs/common/state-queuei.h
openmp/libomptarget/deviceRTLs/common/target_atomic.h [new file with mode: 0644]
openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.cu