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
Thank you. Is there any way for the me to tell the compiler that the pointer is supposed to point to a constant space or global memory space or the shared memory space ?