Skip to content

Commit

Permalink
GPU TPC: Fix segfault when TPC occupancy map is not requested
Browse files Browse the repository at this point in the history
  • Loading branch information
davidrohr committed Nov 16, 2024
1 parent a9d24ec commit a175720
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions GPU/GPUTracking/Global/GPUChainTrackingSliceTracker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,11 @@ int32_t GPUChainTracking::RunTPCTrackingSlices_internal()
TransferMemoryResourceLinkToGPU(RecoStep::TPCSliceTracking, mInputsHost->mResourceOccupancyMap, streamOccMap, &mEvents->init);
}
}
uint32_t& occupancyTotal = *mInputsHost->mTPCClusterOccupancyMap;
occupancyTotal = CAMath::Float2UIntRn(mRec->MemoryScalers()->nTPCHits / (mIOPtrs.settingsTF && mIOPtrs.settingsTF->hasNHBFPerTF ? mIOPtrs.settingsTF->nHBFPerTF : 128));
mRec->UpdateParamOccupancyMap(param().rec.tpc.occupancyMapTimeBins ? mInputsHost->mTPCClusterOccupancyMap + 2 : nullptr, param().rec.tpc.occupancyMapTimeBins ? mInputsShadow->mTPCClusterOccupancyMap + 2 : nullptr, occupancyTotal, streamOccMap);
if (param().rec.tpc.occupancyMapTimeBins || param().rec.tpc.sysClusErrorC12Norm) {
uint32_t& occupancyTotal = *mInputsHost->mTPCClusterOccupancyMap;
occupancyTotal = CAMath::Float2UIntRn(mRec->MemoryScalers()->nTPCHits / (mIOPtrs.settingsTF && mIOPtrs.settingsTF->hasNHBFPerTF ? mIOPtrs.settingsTF->nHBFPerTF : 128));
mRec->UpdateParamOccupancyMap(param().rec.tpc.occupancyMapTimeBins ? mInputsHost->mTPCClusterOccupancyMap + 2 : nullptr, param().rec.tpc.occupancyMapTimeBins ? mInputsShadow->mTPCClusterOccupancyMap + 2 : nullptr, occupancyTotal, streamOccMap);
}

int32_t streamMap[NSLICES];

Expand Down

0 comments on commit a175720

Please sign in to comment.