Hi,
I have a question regarding external shared memory:
Does it make sense to have more than one external shared memory declaration per kernel? The reason I ask is because all these variables start at the same address in memory (the offsets have to be managed explicitly by the application, according to the CUDA Programming Guide, sec. B.2.3).
It seems to me that any application using external shared memory would declare a buffer using ‘extern shared’ and then set up the individual variables explicitly, like this:
[codebox]extern shared char buffer;
global void func( )
{
short* array0 = (short *)buffer;
float* array1 = (float *)&array0[128];
int* array2 = (int *)&array1[64];
...
}[/codebox]
Any thoughts?
Thank you,
Rodrigo