Skip to content

Commit

Permalink
atomicCAS only available for compute-1.1 and above
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcdonell committed May 24, 2012
1 parent 9f019ce commit de79e89
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cubits/accelerate_cuda_function.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ static __inline__ __device__ T atomicCAS32(T* address, T compare, T val)
return u.a;
}

#if !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 110
template <>
static __inline__ __device__ Int32 atomicCAS32(Int32* address, Int32 compare, Int32 val)
{
Expand All @@ -118,6 +119,7 @@ static __inline__ __device__ Word32 atomicCAS32(Word32* address, Word32 compare,
{
return atomicCAS(address, compare, val);
}
#endif

#if !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 120
template <typename T>
Expand Down

0 comments on commit de79e89

Please sign in to comment.