Because the compiler optimizes away the read if it finds that the value is not used afterwards.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Issue with Writing to Global memory | 5 | 2892 | May 16, 2009 | |
Why this kernel hangs? | 14 | 16510 | October 13, 2009 | |
Strange error when reading global memory | 4 | 1365 | June 9, 2009 | |
Works on Emulator but not on GPU device | 1 | 1179 | October 18, 2009 | |
global memory access disabled in a loop | 2 | 1949 | July 7, 2009 | |
Strange behavior | 5 | 6560 | November 7, 2010 | |
GPU kernel hangs | 3 | 2930 | January 29, 2009 | |
What to do when the program crashes | 2 | 2521 | July 11, 2007 | |
strange global memory problem | 1 | 1196 | August 13, 2008 | |
Set global memory inside conditional statement? | 7 | 1347 | July 15, 2009 |