With the code:
max1 = sdata; // Halve size if size isn't a power of 2 size = ((size&(size-1))==0) ? size : size/2;
I’m getting the “Cannot tell what pointer points to, assuming global memory space” warning on the “size = …” line even though “size” was declared as “unsigned long size;” (It’s value was obtained from an array though)
When I comment out the “size = …” line though the warning is given for the "max1 = … " line, even though this warning wasn’t given when the “size = …” line was uncommented. The variable declarations are:
__shared__ float sdata[N_THREADS_IN_BLOCK*2 + 1]; float max1;
So in summary when no code is commented, the warning appears for the "size = " line and when then "size = " line is commented the warning appears for the "max1 = " line.
As a side note, I’m also getting these warnings when accessing 2D arrays (example a[i][tid]) that have been passed as arguments (float **a). Everything works well with the emulator but this problem seems to be messing with my results on the actual GPU.