I am experimenting with trading off the use of shared memory with fewer threads and global memory with a lot of threads. I wish to allow the kernel to use one or the other determined by an argument in the kernel arguments. The compiler warns that the point doesn’t know at compile time what to point to, and decides to make it global. I was afraid of that.
I could solve this by using a preprocessor #define but that would defeat the purpose of dynamically deciding to use shared or global memory for a particular purpose in my kernel. Is it possible to instruct the kernel to use global or shared memory at launch?