Skip to content

Commit e25a8fa

Browse files
committed
GPU TPC: added dynamic buffer allocation during track-model decoding
1 parent 171586d commit e25a8fa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

GPU/GPUTracking/DataCompression/GPUTPCDecompression.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,5 +116,7 @@ void GPUTPCDecompression::RegisterMemoryAllocation()
116116

117117
void GPUTPCDecompression::SetMaxData(const GPUTrackingInOutPointers& io)
118118
{
119-
mMaxNativeClustersPerBuffer = mRec->GetProcessingSettings().tpcMaxAttachedClustersPerSectorRow;
119+
uint32_t maxUnattachedClsPerSectorRow = std::max_element(io.tpcCompressedClusters->nSliceRowClusters, io.tpcCompressedClusters->nSliceRows);
120+
float clsRatio = io.tpcCompressedClusters->nUnattachedClusters > 0 ? float(io.tpcCompressedClusters->nAttachedClusters) / float(io.tpcCompressedClusters->nUnattachedClusters) : 1.0f;
121+
mMaxNativeClustersPerBuffer = std::min(maxUnattachedClsPerSectorRow * clsRatio, mRec->GetProcessingSettings().tpcMaxAttachedClustersPerSectorRow;)
120122
}

0 commit comments

Comments
 (0)