allocate global memory

Discussion created by Meteorhead on Oct 3, 2010
Latest reply on Oct 5, 2010 by MicahVillmow

Dear all,

I'm sure someone knows the answer to this very simple question, but I have not found the solution, no matter how much I googled.

What is the way of allocating memory on device without using buffers? I tried the same way as one would allocate local memory, when setting kernel arguments, I specify a size and pass a NULL pointer. Then inside kernel, the specified kernel argument pointer which is __local appended will be allocated local memory. The same thing does not work if the kernel argument is __global appended.

What is the correct way of doing this?