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 @@ -601,20 +601,14 @@ void TrackerTraits<nLayers>::findCellsNeighbours(const int iteration)
601601 mTimeFrame ->getCellsNeighbours ()[iLayer].reserve (cellsNeighbours.size ());
602602 std::ranges::transform (cellsNeighbours, std::back_inserter (mTimeFrame ->getCellsNeighbours ()[iLayer]), [](const auto & neigh) { return neigh.cell ; });
603603
604- auto it = cellsNeighbours.begin ();
605- int current = it->nextCell ;
606- int maxLvl = it->level ;
607- ++it;
608- for (; it != cellsNeighbours.end (); ++it) {
609- if (it->nextCell == current) {
604+ for (auto it = cellsNeighbours.begin (); it != cellsNeighbours.end ();) {
605+ int cellIdx = it->nextCell ;
606+ int maxLvl = it->level ;
607+ while (++it != cellsNeighbours.end () && it->nextCell == cellIdx) {
610608 maxLvl = std::max (maxLvl, it->level );
611- } else {
612- mTimeFrame ->getCells ()[iLayer + 1 ][current].setLevel (maxLvl);
613- current = it->nextCell ;
614- maxLvl = it->level ;
615609 }
610+ o2::gpu::CAMath::AtomicMax (mTimeFrame ->getCells ()[iLayer + 1 ][cellIdx].getLevelPtr (), maxLvl);
616611 }
617- mTimeFrame ->getCells ()[iLayer + 1 ][current].setLevel (maxLvl);
618612 }
619613 });
620614}
You can’t perform that action at this time.
0 commit comments