diff --git a/openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.h b/openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.h --- a/openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.h +++ b/openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.h @@ -130,6 +130,15 @@ DEVICE unsigned GetWarpId(); DEVICE unsigned GetLaneId(); +// Forward declaration of atomics. Although they're template functions, we +// already have definitions for different types in CUDA internal headers with +// the right mangled names. +template T atomicAdd(T *address, T val); +template T atomicInc(T *address, T val); +template T atomicMax(T *address, T val); +template T atomicExch(T *address, T val); +template T atomicCAS(T *address, T compare, T val); + // Atomics template INLINE T __kmpc_atomic_add(T *address, T val) { return atomicAdd(address, val);