title: Entry function uses too much shared data (0x8020 bytes + 0x10 bytes system, 0x4000 max) - CUDA error
body: <p>I am using Tesla C2050, which has a compute capability 2.0 and has shared memory <code>48KB</code>. BUt when I try to use this shared memory the <code>nvcc</code> compiler gives me the following error</p>
  
  <pre><code>Entry function '_Z4SAT3PhPdii' uses too much shared data (0x8020 bytes + 0x10 bytes system, 0x4000 max)
  </code></pre>
  
  <p>My SAT1 is the naive implementation of scan algorithm, and because I am operating on images sizes of the order <code>4096x2160</code> I have to use double to calculate the cumulative sum. Though <code>Tesla C2050</code> does not support double, but it nevertheless does the task by demoting it to float. But for an image width of 4096 the shared memory size comes out to be greater 16KB but it is well within the 48KB limit.</p>
  
  <p>Can anybody help me understand what is happening here. I am using CUDA toolkit 3.0</p>