title: Arithmetic Cuda program compilation error
body: <p>Am working on a CUDA program which am new to. I encountered the error below, tried fixing but came to a halt. Can anyone take a look and tell me what I might be missing? Any help will be appreciated.  </p>
  
  <pre><code>Error   5   error : too few arguments in function call   
  Error   6   error : argument of type "int *" is incompatible with parameter of type "size_t"    
  Error   7   error : argument of type "unsigned int" is incompatible with parameter of type "cudaMemcpyKind" 
  Error   8   error : too many arguments in function call 2010\Projects\lab\lab\kernel.cu 54  1   lab
  Error   9   error MSB3721: The command ""C:\Program Files\NVIDIA GPU 
  </code></pre>
  
  <p>Here's my code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  #define SIZE 500
  #include &lt;cuda.h&gt;
  
  __global__ void InitialAdd(int *a, int *b, int *c, int *z, int n, float aspa, float bspb, float apa, float bpb)
  {
      int i = blockIdx.x + blockIdx.x * threadIdx.x;
      aspa = (-*a);
      bspb = (-*b);
      aspa = (10,*a);
      bspb = (10,*b);
      *z = (a,2) + (b,2) + aspa + bspb + apa + bpb;
      if(i &lt; n)
          c[i] = a[i] * b[i];
  }
  
  int main(void)
  {
      int *a, *b, *c, *z;
      int *d_a, *d_b, *d_c, *d_z;
  
  
      a = (int *)malloc(SIZE*sizeof(int));
      b = (int *)malloc(SIZE*sizeof(int));
      c = (int *)malloc(SIZE*sizeof(int));
      z = (int *)malloc(SIZE*sizeof(int));
  
      cudaMalloc( &amp;d_a, SIZE*sizeof(int));
      cudaMalloc( &amp;d_b, SIZE*sizeof(int));
      cudaMalloc( &amp;d_c, SIZE*sizeof(int));
      cudaMalloc( &amp;d_z, SIZE*sizeof(int));
  
      for( int i = 0; i &lt; SIZE; i++ )
      {
          a[i] =i;
          b[i] =i;
          c[i] =0;
          z[i] =i;
  
      }
  
      cudaMemcpy( d_a, a, SIZE*sizeof(int), cudaMemcpyHostToDevice );
      cudaMemcpy( d_b, b, SIZE*sizeof(int), cudaMemcpyHostToDevice );
      cudaMemcpy( d_c, c, SIZE*sizeof(int), cudaMemcpyHostToDevice );
      cudaMemcpy( d_z, z, SIZE*sizeof(int), cudaMemcpyHostToDevice );
  
  
      InitialAdd&lt;&lt;&lt; 4 , SIZE &gt;&gt;&gt;( d_a, d_b, d_c, d_z, SIZE);
  
  
      cudaMemcpy( c, d_z, d_c, SIZE*sizeof(int), cudaMemcpyDeviceToHost );
  
      for( int i = 0; i &lt; 1000; i++)
          printf("c[%d] = %d\n", i, c[i], *z);
  
      free(a);
      free(b);
      free(c);
      free(z);
  
      cudaFree(d_a);
      cudaFree(d_b);
      cudaFree(d_c);
      cudaFree(d_z);
  
      return 0;
  }
  </code></pre>