Hi There,
I was checking someone else’s CUDA program and it came to my attention that in the global section of the program he declared this:
device shared float coefyl[256];
As far as I knew (because I read it on some CUDA refence), variables in shared memory should be declared inside a kernel o device function, which is not the case for the “shared” memory declared in this program. One extra detail: this variable is used in 2 kernels in that program.
Question is: is this variable stored in shared memory for each of the 2 kernels ? how can I exactly know where this variable is stored ?
Thanks.