File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
Detectors/ITSMFT/ITS/tracking/src Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -596,20 +596,14 @@ void TrackerTraits<nLayers>::findCellsNeighbours(const int iteration)
596596 mTimeFrame ->getCellsNeighbours ()[iLayer].reserve (cellsNeighbours.size ());
597597 std::ranges::transform (cellsNeighbours, std::back_inserter (mTimeFrame ->getCellsNeighbours ()[iLayer]), [](const auto & neigh) { return neigh.cell ; });
598598
599- auto it = cellsNeighbours.begin ();
600- int current = it->nextCell ;
601- int maxLvl = it->level ;
602- ++it;
603- for (; it != cellsNeighbours.end (); ++it) {
604- if (it->nextCell == current) {
599+ for (auto it = cellsNeighbours.begin (); it != cellsNeighbours.end ();) {
600+ int cellIdx = it->nextCell ;
601+ int maxLvl = it->level ;
602+ while (++it != cellsNeighbours.end () && it->nextCell == cellIdx) {
605603 maxLvl = std::max (maxLvl, it->level );
606- } else {
607- mTimeFrame ->getCells ()[iLayer + 1 ][current].setLevel (maxLvl);
608- current = it->nextCell ;
609- maxLvl = it->level ;
610604 }
605+ o2::gpu::CAMath::AtomicMax (mTimeFrame ->getCells ()[iLayer + 1 ][cellIdx].getLevelPtr (), maxLvl);
611606 }
612- mTimeFrame ->getCells ()[iLayer + 1 ][current].setLevel (maxLvl);
613607 }
614608 });
615609}
You can’t perform that action at this time.
0 commit comments