Hello all
When I try to compile for -arch=sm_20 code like
__global__ void f(unsigned long long int *a, int N)
{
int idx = blockIdx.x * blockDim.x + threadIdx.x;
if (idx<N) atomicMax(a, a[idx]);
}
error appears:
error: no instance of overloaded function “atomicMax” matches the argument list
argument types are: (unsigned long long *, unsigned long long)
Then I try to find declaration for this function:
grep -r “atomicMax” find /usr/local/cuda4.2 -name *.h
/usr/local/cuda4.2/cuda/include/sm_11_atomic_functions.h:static inline device int atomicMax(int *address, int val)
/usr/local/cuda4.2/cuda/include/sm_11_atomic_functions.h:static inline device unsigned int atomicMax(unsigned int *address, unsigned int val)
grep -r “atomicMax” find /usr/local/cuda-5.0 -name *.h
/usr/local/cuda-5.0/include/sm_35_atomic_functions.h:static inline device long long atomicMax(long long *address, long long val)
/usr/local/cuda-5.0/include/sm_35_atomic_functions.h:static inline device unsigned long long atomicMax(unsigned long long *address, unsigned long long val)
/usr/local/cuda-5.0/include/sm_11_atomic_functions.h:static inline device int atomicMax(int *address, int val)
/usr/local/cuda-5.0/include/sm_11_atomic_functions.h:static inline device unsigned int atomicMax(unsigned int *address, unsigned int val
grep -r “atomicMax” find /usr/local/cuda-5.5 -name *.h
/usr/local/cuda-5.5/include/sm_11_atomic_functions.h:static inline device int atomicMax(int *address, int val)
/usr/local/cuda-5.5/include/sm_11_atomic_functions.h:static inline device unsigned int atomicMax(unsigned int *address, unsigned int val)
/usr/local/cuda-5.5/include/sm_32_atomic_functions.h:static inline device long long atomicMax(long long *address, long long val)
/usr/local/cuda-5.5/include/sm_32_atomic_functions.h:static inline device unsigned long long atomicMax(unsigned long long *address, unsigned long long val)
According to this output there is no support for atomicMax(unsigned long long *address, unsigned long long val) for sm_20 devices although official documentation states opposite.
Is it bug in toolkits or documentation error?