@@ -201,8 +201,8 @@ int32_t GPUChainTracking::RunTPCCompression()
201201
202202int32_t GPUChainTracking::RunTPCDecompression ()
203203{
204- const bool runFiltering = GetProcessingSettings ().tpcApplyCFCutsAtDecoding || (GetProcessingSettings ().tpcApplyClusterFilterOnCPU > 0 ) || (param ().tpcCutTimeBin > 0 );
205- if (runFiltering && !GetProcessingSettings ().tpcUseOldCPUDecoding ) {
204+ const bool runFullFiltering = GetProcessingSettings ().tpcApplyCFCutsAtDecoding || (GetProcessingSettings ().tpcApplyClusterFilterOnCPU > 0 ) || (param ().tpcCutTimeBin > 0 );
205+ if (runFullFiltering && !GetProcessingSettings ().tpcUseOldCPUDecoding ) {
206206 GPUFatal (" tpcApplyCFCutsAtDecoding, tpcApplyClusterFilterOnCPU and tpcCutTimeBin currently require tpcUseOldCPUDecoding" );
207207 }
208208
@@ -219,13 +219,13 @@ int32_t GPUChainTracking::RunTPCDecompression()
219219 return ((tmpBuffer = std::make_unique<ClusterNative[]>(size))).get ();
220220 };
221221 auto & decompressTimer = getTimer<TPCClusterDecompressor>(" TPCDecompression" , 0 );
222- auto allocatorUse = runFiltering ? std::function<ClusterNative*(size_t )>{allocatorTmp} : std::function<ClusterNative*(size_t )>{allocatorFinal};
222+ auto allocatorUse = runFullFiltering ? std::function<ClusterNative*(size_t )>{allocatorTmp} : std::function<ClusterNative*(size_t )>{allocatorFinal};
223223 decompressTimer.Start ();
224224 if (decomp.decompress (mIOPtrs .tpcCompressedClusters , *mClusterNativeAccess , allocatorUse, param (), GetProcessingSettings ().deterministicGPUReconstruction )) {
225225 GPUError (" Error decompressing clusters" );
226226 return 1 ;
227227 }
228- if (runFiltering ) {
228+ if (runFullFiltering ) {
229229 RunTPCClusterFilter (mClusterNativeAccess .get (), allocatorFinal, GetProcessingSettings ().tpcApplyCFCutsAtDecoding );
230230 }
231231 decompressTimer.Stop ();
@@ -245,7 +245,7 @@ int32_t GPUChainTracking::RunTPCDecompression()
245245 mRec ->PushNonPersistentMemory (qStr2Tag (" TPCDCMPR" ));
246246 RecoStep myStep = RecoStep::TPCDecompression;
247247 bool doGPU = GetRecoStepsGPU () & RecoStep::TPCDecompression;
248- bool runFiltering = param ().tpcCutTimeBin > 0 ;
248+ bool runTimeBinCutFiltering = param ().tpcCutTimeBin > 0 ;
249249 GPUTPCDecompression& Decompressor = processors ()->tpcDecompressor ;
250250 GPUTPCDecompression& DecompressorShadow = doGPU ? processorsShadow ()->tpcDecompressor : Decompressor;
251251 const auto & threadContext = GetThreadContext ();
@@ -325,7 +325,7 @@ int32_t GPUChainTracking::RunTPCDecompression()
325325 if (decodedAttachedClusters != cmprClsHost.nAttachedClusters ) {
326326 GPUWarning (" %u / %u clusters failed track model decoding (%f %%)" , cmprClsHost.nAttachedClusters - decodedAttachedClusters, cmprClsHost.nAttachedClusters , 100 .f * (float )(cmprClsHost.nAttachedClusters - decodedAttachedClusters) / (float )cmprClsHost.nAttachedClusters );
327327 }
328- if (runFiltering ) { // If filtering, allocate a temporary buffer and cluster native access in decompressor context
328+ if (runTimeBinCutFiltering ) { // If filtering, allocate a temporary buffer and cluster native access in decompressor context
329329 Decompressor.mNClusterNativeBeforeFiltering = DecompressorShadow.mNClusterNativeBeforeFiltering = decodedAttachedClusters + cmprClsHost.nUnattachedClusters ;
330330 AllocateRegisteredMemory (Decompressor.mResourceTmpBufferBeforeFiltering );
331331 AllocateRegisteredMemory (Decompressor.mResourceClusterNativeAccess );
@@ -362,13 +362,13 @@ int32_t GPUChainTracking::RunTPCDecompression()
362362 int32_t iStream = (iSector / batchSize) % mRec ->NStreams ();
363363 runKernel<GPUTPCDecompressionKernels, GPUTPCDecompressionKernels::step1unattached>({GetGridAuto (iStream), krnlRunRangeNone, {nullptr , &mEvents ->single }}, iSector, batchSize);
364364 uint32_t copySize = std::accumulate (mClusterNativeAccess ->nClustersSector + iSector, mClusterNativeAccess ->nClustersSector + iSector + batchSize, 0u );
365- if (!runFiltering ) {
365+ if (!runTimeBinCutFiltering ) {
366366 GPUMemCpy (RecoStep::TPCDecompression, mInputsHost ->mPclusterNativeOutput + mClusterNativeAccess ->clusterOffset [iSector][0 ], DecompressorShadow.mNativeClustersBuffer + mClusterNativeAccess ->clusterOffset [iSector][0 ], sizeof (Decompressor.mNativeClustersBuffer [0 ]) * copySize, iStream, false );
367367 }
368368 }
369369 SynchronizeGPU ();
370370
371- if (runFiltering ) { // If filtering is applied, count how many clusters will remain after filtering and allocate final buffers accordingly
371+ if (runTimeBinCutFiltering ) { // If filtering is applied, count how many clusters will remain after filtering and allocate final buffers accordingly
372372 AllocateRegisteredMemory (Decompressor.mResourceNClusterPerSectorRow );
373373 WriteToConstantMemory (myStep, (char *)&processors ()->tpcDecompressor - (char *)processors (), &DecompressorShadow, sizeof (DecompressorShadow), unattachedStream);
374374 runKernel<GPUMemClean16>({GetGridAutoStep (unattachedStream, RecoStep::TPCDecompression), krnlRunRangeNone}, DecompressorShadow.mNClusterPerSectorRow , NSECTORS * GPUCA_ROW_COUNT * sizeof (DecompressorShadow.mNClusterPerSectorRow [0 ]));
0 commit comments