Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2014
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. for(int stride = 1; stride <= BLOCK_SIZE; stride *= 2) {
  2. int i = (t + 1) * stride * 2 - 1;
  3.  
  4. if(i < BLOCK_SIZE << 1)
  5. scan_array[i] += scan_array[i - stride];
  6.  
  7. __syncthreads();
  8. }
  9.  
  10. if(t == 0)
  11. out[blockIdx.x] = scan_array[2 * BLOCK_SIZE - 1];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement