Support for Atomic inc and dec in HIP

Change-Id: I783e4917cece5cc379894f0d293382315fbfa8b0
This commit is contained in:
Rahul Garg
2016-05-11 12:51:11 +05:30
parent 7aa503f43f
commit 381dc93b96
3 changed files with 26 additions and 9 deletions
+12
View 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)