Skip to content

Commit a3cd5ae

Browse files
msaroufimleofang
andauthored
fix indexing bug in saxpy.py (#582)
* fix indexing bug in saxpy.py * signoff Signed-off-by: Mark Saroufim <[email protected]> --------- Signed-off-by: Mark Saroufim <[email protected]> Co-authored-by: Leo Fang <[email protected]>
1 parent 9e868ba commit a3cd5ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cuda_core/examples/saxpy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
size_t N) {
1919
const unsigned int tid = threadIdx.x + blockIdx.x * blockDim.x;
2020
for (size_t i=tid; i<N; i+=gridDim.x*blockDim.x) {
21-
out[tid] = a * x[tid] + y[tid];
21+
out[i] = a * x[i] + y[i];
2222
}
2323
}
2424
"""

0 commit comments

Comments
 (0)