Pointer array parameter to kernel

I am trying to make a kernel that accepts an array of pointers as one of its parameters:

template < int N >

__global__ void Kernel(complex * array[N], ... )




void Call(complex * array[5])


   Kernel < 5 > <<< dim3(10, 10), dim3(16, 16) >>> (array);


This results in a spew of warnings:

Warning: Cannot tell what pointer points to, assuming global memory space

and this error:

cannot convert parameter 1 from ‘complex *’ to ‘complex *(&)[5]’

Anything that solves my problem of needing to send a number of pointers dependent on the template argument would be useful.

I think that even you using a template to tell nvcc the size of your array it will not recognize it. Try remove the template and the N index on your kernel. About the warning, post the structure complex.

Hope this will help you.