I would like to do the following. Is it safe ?
constant int * constMemToGlobalMem;
constMemToGlobalMem contains integer pointer in global memory space. i.e. I’m strong the address of integer arrays in global memory space in constant memory space.
global void myKernel()
shared int * myThreadBlockPtr = constMemToGlobalMem[blockId.x]; // <------------ Here the warning is produced.
// Is the above statement legal. It is a shared memory pointer pointing to an address in constant memory space that points to global memory space ?
myThreadBlockPtr[threadId.x] = 10;
When I compile my code I get the following warning ./test.cu(17): Warning: Cannot tell what pointer points to, assuming global memory space