@@ -581,7 +581,7 @@ GPUd() void GPUTPCGMMerger::UnpackSectorGlobal(int32_t nBlocks, int32_t nThreads
581581 uint32_t nTracks = *trk.NTracks ();
582582 for (uint32_t itr = nLocalTracks + iBlock * nThreads + iThread; itr < nTracks; itr += nBlocks * nThreads) {
583583 sectorTr = &trk.Tracks ()[itr];
584- int32_t localId = mTrackIDs [(sectorTr->LocalTrackId () >> 24 ) * mNMaxSingleSectorTracks + (sectorTr->LocalTrackId () & 0xFFFFFF )];
584+ int32_t localId = mTrackIDs [(( sectorTr->LocalTrackId () >> 24 ) & 0x3F ) * mNMaxSingleSectorTracks + (sectorTr->LocalTrackId () & 0xFFFFFF )];
585585 if (localId == -1 ) {
586586 continue ;
587587 }
@@ -594,7 +594,7 @@ GPUd() void GPUTPCGMMerger::UnpackSectorGlobal(int32_t nBlocks, int32_t nThreads
594594 track.SetNextNeighbour (-1 );
595595 track.SetNextSegmentNeighbour (-1 );
596596 track.SetPrevSegmentNeighbour (-1 );
597- track.SetLocalTrackId (localId);
597+ track.SetLocalTrackId (localId | (sectorTr-> LocalTrackId () & 0x40000000 ) );
598598 }
599599}
600600
@@ -643,10 +643,9 @@ GPUd() void GPUTPCGMMerger::LinkExtrapolatedTracks(int32_t nBlocks, int32_t nThr
643643{
644644 for (int32_t itr = SectorTrackInfoGlobalFirst (0 ) + iBlock * nThreads + iThread; itr < SectorTrackInfoGlobalLast (NSECTORS - 1 ); itr += nThreads * nBlocks) {
645645 GPUTPCGMSectorTrack& extrapolatedTrack = mSectorTrackInfos [itr];
646- GPUTPCGMSectorTrack& localTrack = mSectorTrackInfos [extrapolatedTrack.LocalTrackId ()];
647- if (localTrack.ExtrapolatedTrackId (0 ) != -1 || !CAMath::AtomicCAS (&localTrack.ExtrapolatedTrackIds ()[0 ], -1 , itr)) {
648- localTrack.SetExtrapolatedTrackId (1 , itr);
649- }
646+ GPUTPCGMSectorTrack& localTrack = mSectorTrackInfos [extrapolatedTrack.LocalTrackId () & 0xFFFFFF ];
647+ int up = (extrapolatedTrack.LocalTrackId () & 0x40000000 ) ? 1 : 0 ;
648+ localTrack.SetExtrapolatedTrackId (up, itr);
650649 }
651650}
652651
0 commit comments