Skip to content

Commit f93abbe

Browse files
author
Carsten Griwodz
committed
[bugfix] fix the bug in bitonic_sort
1 parent de5311e commit f93abbe

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/popsift/common/warp_bitonic_sort.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ class Warp32
6666
: ( my_val < other_val );
6767
const bool must_swap = not ( my_more ^ reverse ^ increasing );
6868

69-
return ( must_swap ? popsift::shuffle_xor( my_index, 1 << shift )
70-
: my_index );
69+
int lane = must_swap ? ( 1 << shift ) : 0;
70+
return popsift::shuffle_xor( my_index, lane );
7171
}
7272

7373
__device__ inline

0 commit comments

Comments
 (0)