Support for Atomic inc and dec in HIP

Change-Id: I783e4917cece5cc379894f0d293382315fbfa8b0


[ROCm/hip commit: 381dc93b96]
This commit is contained in:
Rahul Garg
2016-05-11 12:51:11 +05:30
orang tua 3904f12d93
melakukan d10703011c
3 mengubah file dengan 26 tambahan dan 9 penghapusan
+12
Melihat File
@@ -657,7 +657,19 @@ __device__ unsigned long long int atomicXor(unsigned long long int* address,
return (long long int)hc::atomic_fetch_xor((uint64_t*)address,(uint64_t)val);
}
//atomicInc
__device__ int atomicInc(unsigned int* address,
unsigned int val)
{
return hc::__atomic_wrapinc(address,val);
}
//atomicDec
__device__ int atomicDec(unsigned int* address,
unsigned int val)
{
return hc::__atomic_wrapdec(address,val);
}
__device__ unsigned int test__popc(unsigned int input)