OSDN Git Service

[libomptarget][devicertl][nfc] Simplify target_atomic abstraction
authorJon Chesterfield <jonathanchesterfield@gmail.com>
Wed, 20 Jan 2021 19:50:50 +0000 (19:50 +0000)
committerJon Chesterfield <jonathanchesterfield@gmail.com>
Wed, 20 Jan 2021 19:50:50 +0000 (19:50 +0000)
commitfbc1dcb946553a3dc923a63288d9275eea86f918
tree768c7eda85293b171d5b5d20410f195967984a59
parent599fdfc5db8f44582ee9bd05544769268ec9b4a3
[libomptarget][devicertl][nfc] Simplify target_atomic abstraction

[libomptarget][devicertl][nfc] Simplify target_atomic abstraction

Atomic functions were implemented as a shim around cuda's atomics, with
amdgcn implementing those symbols as a shim around gcc style intrinsics.

This patch folds target_atomic.h into target_impl.h and folds amdgcn.

Further work is likely to be useful here, either changing to openmp's atomic
interface or instantiating the templates on the few used types in order to
move them into a cuda/c++ implementation file. This change is mostly to
group the remaining uses of the cuda api under nvptx' target_impl abstraction.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D95062
openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
openmp/libomptarget/deviceRTLs/amdgcn/src/hip_atomics.h [deleted file]
openmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.h
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 [deleted file]
openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.cu
openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.h