diff --git a/RecoPixelVertexing/PixelTriplets/plugins/GPUCACell.h b/RecoPixelVertexing/PixelTriplets/plugins/GPUCACell.h index 0fd514e26d223..bf56be2ab9698 100644 --- a/RecoPixelVertexing/PixelTriplets/plugins/GPUCACell.h +++ b/RecoPixelVertexing/PixelTriplets/plugins/GPUCACell.h @@ -69,6 +69,7 @@ class GPUCACell { auto i = cellNeighbors.extend(); // maybe wasted.... if (i > 0) { cellNeighbors[i].reset(); + __threadfence(); #ifdef __CUDACC__ auto zero = (PtrAsInt)(&cellNeighbors[0]); atomicCAS((PtrAsInt*)(&theOuterNeighbors), @@ -89,6 +90,7 @@ class GPUCACell { auto i = cellTracks.extend(); // maybe wasted.... if (i > 0) { cellTracks[i].reset(); + __threadfence(); #ifdef __CUDACC__ auto zero = (PtrAsInt)(&cellTracks[0]); atomicCAS((PtrAsInt*)(&theTracks), zero, (PtrAsInt)(&cellTracks[i])); // if fails we cannot give "i" back...