@@ -126,18 +126,10 @@ void TrackerTraitsGPU<nLayers>::computeLayerCells(const int iteration)
126126 mTimeFrameGPU ->createCellsLUTDevice ();
127127 auto & conf = o2::its::ITSGpuTrackingParamConfig::Instance ();
128128
129- std::vector<bool > isTrackletStreamSynched (this ->mTrkParams [iteration].TrackletsPerRoad ());
130- auto syncOnce = [&](const int iLayer) {
131- if (!isTrackletStreamSynched[iLayer]) {
132- mTimeFrameGPU ->syncStream (iLayer);
133- isTrackletStreamSynched[iLayer] = true ;
134- }
135- };
136-
129+ mTimeFrameGPU ->syncStream (0 );
137130 for (int iLayer = 0 ; iLayer < this ->mTrkParams [iteration].CellsPerRoad (); ++iLayer) {
138- // need to ensure that trackleting on layers iLayer and iLayer + 1 are done (only once)
139- syncOnce (iLayer);
140- syncOnce (iLayer + 1 );
131+ mTimeFrameGPU ->syncStream (iLayer + 1 );
132+
141133 // if there are no tracklets skip entirely
142134 const int currentLayerTrackletsNum{static_cast <int >(mTimeFrameGPU ->getNTracklets ()[iLayer])};
143135 if (!currentLayerTrackletsNum || !mTimeFrameGPU ->getNTracklets ()[iLayer + 1 ]) {
@@ -191,18 +183,10 @@ void TrackerTraitsGPU<nLayers>::findCellsNeighbours(const int iteration)
191183 mTimeFrameGPU ->createNeighboursIndexTablesDevice ();
192184 const auto & conf = o2::its::ITSGpuTrackingParamConfig::Instance ();
193185
194- std::vector<bool > isCellStreamSynched (this ->mTrkParams [iteration].TrackletsPerRoad () - 1 );
195- auto syncOnce = [&](const int iLayer) {
196- if (!isCellStreamSynched[iLayer]) {
197- mTimeFrameGPU ->syncStream (iLayer);
198- isCellStreamSynched[iLayer] = true ;
199- }
200- };
201-
186+ mTimeFrameGPU ->syncStream (0 );
202187 for (int iLayer{0 }; iLayer < this ->mTrkParams [iteration].CellsPerRoad () - 1 ; ++iLayer) {
203188 // ensure that celling is done for iLayer and iLayer+1 is done
204- syncOnce (iLayer);
205- syncOnce (iLayer + 1 );
189+ mTimeFrameGPU ->syncStream (iLayer + 1 );
206190
207191 const int currentLayerCellsNum{static_cast <int >(mTimeFrameGPU ->getNCells ()[iLayer])};
208192 const int nextLayerCellsNum{static_cast <int >(mTimeFrameGPU ->getNCells ()[iLayer + 1 ])};
0 commit comments