Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions FriedLiver/Source/SiftGPU/ProgramCU.cu
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ void __global__ ComputeOrientation_Kernel(float4* d_list,
const unsigned int p = (tidx + 1) % 36;
target[tidx] = (source[m] + source[c] + source[p])*one_third;

__syncthreads();
__threadfence();
volatile float *tmp = source;
source = target;
target = tmp;
Expand Down Expand Up @@ -1100,8 +1100,8 @@ void __global__ ComputeOrientation_Kernel(float4* d_list,
__syncthreads();
if (tidx == 0) {
weights[maxIndex] = -1.0f;
__syncthreads();
}
__syncthreads();

// 2nd reduction to compute 2nd max weight
for (unsigned int stride = COMPUTE_ORIENTATION_BLOCK / 2; stride > 0; stride /= 2) {
Expand Down