From 6d49fb32d54a40f0ff9d08e3b91ba1a4902b896e Mon Sep 17 00:00:00 2001 From: Paulius Velesko Date: Wed, 30 Oct 2024 08:21:26 +0200 Subject: [PATCH] implement a missing atomicMax --- include/hip/devicelib/atomics.hh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/hip/devicelib/atomics.hh b/include/hip/devicelib/atomics.hh index 0a21c1f8f..f4bbf0b9a 100644 --- a/include/hip/devicelib/atomics.hh +++ b/include/hip/devicelib/atomics.hh @@ -241,6 +241,12 @@ atomicMax(unsigned long long *address, unsigned long long val) { return __chip_atomic_max_l(address, val); } +extern "C" __device__ double +__chip_atomic_max_f64(__chip_obfuscated_ptr_t address, double val); +extern "C++" inline __device__ double atomicMax(double *address, double val) { + return __chip_atomic_max_f64(__chip_obfuscate_ptr(address), val); +} + extern "C" __device__ int __chip_atomic_max_system_i(int *address, int val); extern "C++" inline __device__ int atomicMax_system(int *address, int val) { return __chip_atomic_max_system_i(address, val);