title: CUDA pow function with integer arguments
body: <p>I'm new in CUDA, and cannot understand what I'm doing wrong.</p>
  
  <p>I'm trying to calculate the distance of object it has id in array, axis x in array and axis y in array to find neighbors for each object</p>
  
  <pre><code>__global__ 
  void dist(int *id_d, int *x_d, int *y_d, 
                int *dist_dev, int dimBlock, int i)
  {
      int idx = threadIdx.x + blockIdx.x*blockDim.x;
  
      while(idx &lt; dimBlock){
          int i;
          for(i= 0; i&lt; dimBlock; i++){
              if (idx == i)continue;
              dist_dev[idx] = pow(x_d[idx] - x_d[i], 2) + pow(y_d[idx] - y_d[i], 2); // error here
          }
      }
  }
  </code></pre>
  
  <p>Is <code>pow</code> not defined in kernel code?</p>