In my project, I’ve created a kernel function which accesses a global pointer variable pointing to memory created with malloc(). I’m finding that this code compiles fine for for the Emu targets but does not compile for device targets. Can someone confirm that this is the case, and where in the CUDA programming manual says this?
Notice that in the code the kernel accesses global pointer global_var and that compiling this with --emudevice is fine. But compiling for real hardware will error with something like:
tmpxft_00000b14_00000000-3.gpu
"gpu.cu", line 21: error: identifier "global_var" is undefined
(global_var[(y * dimx) + x]) = ((char)n);
^