Skip to content

Commit 6e4428b

Browse files
committed
Reintroduce sync, and set the total on every thread.
1 parent c238a92 commit 6e4428b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/popsift/common/excl_blk_prefix_sum.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,10 @@ class Block
137137
if( threadIdx.y == 0 && threadIdx.x == 31 ) {
138138
loop_total += ibs;
139139
}
140+
__syncthreads();
140141
}
141142

142-
if( threadIdx.y == 0 && threadIdx.x == 31 )
143-
{
144-
_total_writer.set( loop_total );
145-
}
143+
_total_writer.set( loop_total );
146144
}
147145
};
148146

0 commit comments

Comments
 (0)