Skip to content

Commit 9dffece

Browse files
committed
correct id in global array
1 parent fa0d873 commit 9dffece

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

smem_bitonic_sort.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ __global__ void smemBitonicSort(int *arr, int size) {
109109

110110
// update value in array with sorted value
111111
if (thread_id < size) {
112-
arr[thread_id] = x;
112+
arr[thread_id + blockIdx.x * blockDim.x] = x;
113113
}
114114
}
115115

0 commit comments

Comments
 (0)