Reputation: 923
Title says it all.
Is there anything similar to alloca() functionality in cuda but for the device side? I need to allocate small-sized arrays(nxn and nx1, with n<=10), n is a dynamic variable.
thanks!
Upvotes: 2
Views: 224
Reputation: 64
You will have to use malloc
or new
inside the kernel. Be careful though, as this will allocate memory in the global memory space.
Upvotes: 2