Skip to content

Commit 2f3b142

Browse files
committed
Resolve two race conditions identified by racecheck.
1 parent 3e624d2 commit 2f3b142

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/popsift/s_orientation.cu

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ void ori_par( const int octave,
7575
__shared__ float sm_hist[ORI_NBINS];
7676

7777
for( int i = threadIdx.x; i < ORI_NBINS; i += blockDim.x ) hist[i] = 0.0f;
78+
__syncthreads();
7879

7980
/* keypoint fractional geometry */
8081
const float x = iext->xpos;
@@ -206,6 +207,7 @@ void ori_par( const int octave,
206207

207208
int2 best_index = make_int2( threadIdx.x, threadIdx.x + 32 );
208209

210+
__syncthreads();
209211
BitonicSort::Warp32<float> sorter( yval );
210212
sorter.sort64( best_index );
211213
__syncthreads();

0 commit comments

Comments
 (0)