I'm working on CUDA as a beginner and am trying to execute a pre written code the compile gives error for every atomic operation that the code contains... for example
__global__ void MarkEdgesUV(unsigned int *d_edge_flag, unsigned long long int *d_appended_uvw, unsigned int *d_size, int no_of_edges)
{
unsigned int tid = blockIdx.x*MAX_THREADS_PER_BLOCK + threadIdx.x;
if(tid<no_of_edges)
{
if(tid>0)
{
unsigned long long int test = INF;
test = test << NO_OF_BITS_MOVED_FOR_VERTEX_IDS;
test |=INF;
unsigned long long int test1 = d_appended_uvw[tid]>>(64-(NO_OF_BITS_MOVED_FOR_VERTEX_IDS+NO_OF_BITS_MOVED_FOR_VERTEX_IDS));
unsigned long long int test2 = d_appended_uvw[tid-1]>>(64-(NO_OF_BITS_MOVED_FOR_VERTEX_IDS+NO_OF_BITS_MOVED_FOR_VERTEX_IDS));
if(test1>test2)
d_edge_flag[tid]=1;
if(test1 == test)
* atomicMin(d_size,tid); //also to know the last element in the array, i.e. the size of new edge list
}
else
d_edge_flag[tid]=1;
}
}
gives the error: error: identifier "atomicMin" is undefined this happen to be a very reliable code...also i check out, the usage of atomics seems correct....please explain why the error has occured?