We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28e31fe commit a8b66c0Copy full SHA for a8b66c0
docs/03-streams.md
@@ -291,7 +291,7 @@ __global__ void reverse(double *d_a) {
291
s_a[tid] = d_a[tid]; /* each thread fills one entry */
292
__syncthreads(); /* all threads in a block must reach this point before
293
any thread in that block is allowed to continue. */
294
- d_a[tid] = s_a[BLOCKSIZE-tid]; /* safe to write out array in reverse order */
+ d_a[tid] = s_a[BLOCKSIZE-tid-1]; /* safe to write out array in reverse order */
295
}
296
```
297
0 commit comments