title: About global memory access method
body: <p>In general, for GPU, which accessing mode is faster (read data from a continous block of global memory)?</p>
  
  <p>(1) for-loops with single or very small number of threads to read data from a block of global memory;</p>
  
  <p>(2) let alot of threads, maybe from different blocks, to read data from global memory concurrently.</p>
  
  <p>e.g.</p>
  
  <pre><code>if (threadIdx.x==0)
  {
    for (int i=0; i&lt;1000; ++i)
  
       buffer[i]=data[i];//data is stored in global memory
  }
  
  OR:
  
  buffer[threadIdx.x]=data[threadIdx.x];//there are 1000 threads in this thread block
  </code></pre>