Skip to content

Commit

Permalink
Work around atomicAdd synchronisation problem on Volta (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
fwyzard committed Nov 16, 2020
1 parent 2092143 commit be8f851
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions RecoLocalTracker/SiPixelClusterizer/plugins/gpuClustering.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ namespace gpuClustering {
printf("# loops %d\n",nloops);
#endif

__shared__ int foundClusters;
__shared__ unsigned int foundClusters;
foundClusters = 0;
__syncthreads();

Expand All @@ -208,7 +208,7 @@ namespace gpuClustering {
if (id[i] == InvId) // skip invalid pixels
continue;
if (clusterId[i] == i) {
auto old = atomicAdd(&foundClusters, 1);
auto old = atomicInc(&foundClusters, 0xffffffff);
clusterId[i] = -(old + 1);
}
}
Expand Down

0 comments on commit be8f851

Please sign in to comment.