File tree Expand file tree Collapse file tree 3 files changed +3
-2
lines changed
Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -52,3 +52,4 @@ Fixes and enhancements
5252- Fixed a bug in :class: `Stream ` and other classes where object cleanup would error during interpreter shutdown.
5353- :class: `StridedMemoryView ` of an underlying array using the DLPack protocol will no longer leak memory.
5454- General performance improvement.
55+ - Fixed incorrect index usage in vector_add example
Original file line number Diff line number Diff line change 3535 size_t N) {
3636 const unsigned int tid = threadIdx.x + blockIdx.x * blockDim.x;
3737 for (size_t i=tid; i<N; i+=gridDim.x*blockDim.x) {
38- C[tid ] = A[tid ] + B[tid ];
38+ C[i ] = A[i ] + B[i ];
3939 }
4040}
4141"""
Original file line number Diff line number Diff line change 2121 size_t N) {
2222 const unsigned int tid = threadIdx.x + blockIdx.x * blockDim.x;
2323 for (size_t i=tid; i<N; i+=gridDim.x*blockDim.x) {
24- C[tid ] = A[tid ] + B[tid ];
24+ C[i ] = A[i ] + B[i ];
2525 }
2626}
2727"""
You can’t perform that action at this time.
0 commit comments