09-26-2011, 03:24 PM
Similar to how you can pass a size in bytes and a NULL value for a __local pointer when you want to dynamically allocate some local memory, it would be useful to do the same for a __global pointer. If you don't be read or write to the __global pointer from any other device, why must you create a buffer which would seem to have more overhead than necessary? Think of any time you need some temporary scratch local memory, but you need a lot more of it than available, i.e., some temporary scratch global memory. If you can program this way for local memory then why not for global memory?