Skip to content

Commit a8b66c0

Browse files
authored
Update 03-streams.md
1 parent 28e31fe commit a8b66c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/03-streams.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ __global__ void reverse(double *d_a) {
291291
s_a[tid] = d_a[tid]; /* each thread fills one entry */
292292
__syncthreads(); /* all threads in a block must reach this point before
293293
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 */
294+
d_a[tid] = s_a[BLOCKSIZE-tid-1]; /* safe to write out array in reverse order */
295295
}
296296
```
297297

0 commit comments

Comments
 (0)