Allocating array in kernel

Hi there mates,

i’m getting some trouble with kernels. The problem is simple: i need to allocate an array of different size for each thread in kernel (so i must dinamically allocate memory). The parameter that decides the size is passed to the kernel.

I was looking throught forums and papers trying to find some information about allocation in kernel, but the documentation is ambiguous and i don’t know how to proceed.

Thanks in advance for help

allocating memory in the kernel function is CANNOT possible in CUDA upto now!

Thanks…

it seems i need to get a better approach to my problem

Maybe you can allocate a large enough array and give to every thread a different index to access to it.