title: Some issue with Atomic add in CUDA kernel operation
body: <p>I'm having a issue with my kernel.cu class</p>
  
  <p>Calling <code>nvcc -v kernel.cu -o kernel.o</code> I'm getting this error:</p>
  
  <pre><code>kernel.cu(17): error: identifier "atomicAdd" is undefined
  </code></pre>
  
  <p>My code: </p>
  
  <pre><code>#include "dot.h"
  #include &lt;cuda.h&gt;
  #include "device_functions.h" //might call atomicAdd
  
  __global__ void dot (int *a, int *b, int *c){
      __shared__ int temp[THREADS_PER_BLOCK];
      int index = threadIdx.x + blockIdx.x * blockDim.x;
      temp[threadIdx.x] = a[index] * b[index];
  
      __syncthreads();
  
      if( 0 == threadIdx.x ){
          int sum = 0;
          for( int i = 0; i&lt;THREADS_PER_BLOCK; i++)
              sum += temp[i];
          atomicAdd(c, sum);
      }
  }
  </code></pre>
  
  <p>Some suggest?</p>