Removing redundant LOAD and STORE on primitives plus adding some atomics (#585)
This commit is contained in:
committed by
GitHub
orang tua
6dd090917a
melakukan
451c287aa6
@@ -20,7 +20,7 @@ static __device__ int min(int a, ssize_t b) { return (a < b) ? a : b; }
|
||||
inline __device__ int loadInt(int* ptr) {
|
||||
int v;
|
||||
#if defined(__HIP_PLATFORM_HCC__) || defined(__HCC__) || defined(__HIPCC__)
|
||||
v = LOAD(ptr);
|
||||
v = atomicAdd_system((unsigned long long *)ptr, 0);
|
||||
#else
|
||||
asm volatile("ld.volatile.global.u32 %0, [%1];"
|
||||
: "=r"(v) : "l"(ptr));
|
||||
|
||||
Reference in New Issue
Block a user