Skip to content

Commit

Permalink
Desul atomics: Fix NVCC warning integer conversion resulted in a chan…
Browse files Browse the repository at this point in the history
…ge of sign
  • Loading branch information
dalg24 committed Mar 17, 2023
1 parent 65aa95e commit 762e3ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tpls/desul/include/desul/atomics/Fetch_Op_CUDA.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ inline __device__ unsigned long long device_atomic_fetch_inc(unsigned long long*

inline __device__ int device_atomic_fetch_dec( int* ptr, MemoryOrderRelaxed, MemoryScopeDevice) { return atomicSub(ptr, 1 ); }
inline __device__ unsigned int device_atomic_fetch_dec( unsigned int* ptr, MemoryOrderRelaxed, MemoryScopeDevice) { return atomicSub(ptr, 1u ); }
inline __device__ unsigned long long device_atomic_fetch_dec(unsigned long long* ptr, MemoryOrderRelaxed, MemoryScopeDevice) { return atomicAdd(ptr, -1 ); }
inline __device__ unsigned long long device_atomic_fetch_dec(unsigned long long* ptr, MemoryOrderRelaxed, MemoryScopeDevice) { return atomicAdd(ptr, -1ull);}

inline __device__ unsigned int device_atomic_fetch_inc_mod( unsigned int* ptr, unsigned int val, MemoryOrderRelaxed, MemoryScopeDevice) { return atomicInc(ptr, val); }
inline __device__ unsigned int device_atomic_fetch_dec_mod( unsigned int* ptr, unsigned int val, MemoryOrderRelaxed, MemoryScopeDevice) { return atomicDec(ptr, val); }
Expand Down

0 comments on commit 762e3ce

Please sign in to comment.