On passing my pointer to point to the array, I am getting the foll error: argument of type "float " is incompatible with parameter of type "float ()[32768]
relevant Snippets of my code are:
#define N 32768
__global__ void op(float k_a[][N])
{
//some operation
}
float *ptr_a=(float*)malloc(N*N*sizeof(float));
float *d_ptr_a;cudaMalloc((void**)&d_ptr_a,N*N*sizeof(float));
cudaMemcpy(d_ptr_a,ptr_a,N*N*sizeof(float),cudaMemcpyHostToDevice);
op<<<nblocks,nthreadsperblock>>>(d_ptr_a)
Can some tell me whats going wrong? I am a beginner to CUDA.