@@ -205,12 +205,6 @@ int32_t GPUChainTracking::RunTPCCompression()
205205
206206int32_t GPUChainTracking::RunTPCDecompression ()
207207{
208- ClusterNativeAccess* original = new ClusterNativeAccess;
209- original->clustersLinear = new ClusterNative[mIOPtrs .clustersNative ->nClustersTotal ];
210- memcpy ((void *)original->clustersLinear , mIOPtrs .clustersNative ->clustersLinear , mIOPtrs .clustersNative ->nClustersTotal * sizeof (mIOPtrs .clustersNative ->clustersLinear [0 ]));
211- memcpy ((void *)original->nClusters , mIOPtrs .clustersNative ->nClusters , NSLICES * GPUCA_ROW_COUNT * sizeof (mIOPtrs .clustersNative ->nClusters [0 ][0 ]));
212- original->setOffsetPtrs ();
213-
214208#ifdef GPUCA_HAVE_O2HEADERS
215209 if (GetProcessingSettings ().tpcUseOldCPUDecoding ) {
216210 const auto & threadContext = GetThreadContext ();
@@ -380,7 +374,7 @@ int32_t GPUChainTracking::RunTPCDecompression()
380374 }
381375 SynchronizeGPU ();
382376
383- if (1 || GetProcessingSettings ().deterministicGPUReconstruction || GetProcessingSettings ().debugLevel >= 4 ) {
377+ if (GetProcessingSettings ().deterministicGPUReconstruction || GetProcessingSettings ().debugLevel >= 4 ) {
384378 runKernel<GPUTPCDecompressionUtilKernels, GPUTPCDecompressionUtilKernels::sortPerSectorRow>(GetGridAutoStep (unattachedStream, RecoStep::TPCDecompression));
385379 const ClusterNativeAccess* decoded = mIOPtrs .clustersNative ;
386380 if (doGPU) {
@@ -393,49 +387,6 @@ int32_t GPUChainTracking::RunTPCDecompression()
393387 }
394388 }
395389 }
396-
397- const ClusterNativeAccess* decoded = mIOPtrs .clustersNative ;
398- unsigned int decodingErrors = 0 ;
399- std::vector<o2::tpc::ClusterNative> tmpClusters;
400- if (param ().rec .tpc .rejectionStrategy == GPUSettings::RejectionNone) {
401- for (unsigned int i = 0 ; i < NSLICES; i++) {
402- for (unsigned int j = 0 ; j < GPUCA_ROW_COUNT; j++) {
403- if (original->nClusters [i][j] != decoded->nClusters [i][j]) {
404- GPUError (" Number of clusters mismatch slice %u row %u: expected %d v.s. decoded %d" , i, j, original->nClusters [i][j], decoded->nClusters [i][j]);
405- decodingErrors++;
406- continue ;
407- }
408- tmpClusters.resize (original->nClusters [i][j]);
409- for (unsigned int k = 0 ; k < original->nClusters [i][j]; k++) {
410- tmpClusters[k] = original->clusters [i][j][k];
411- if (param ().rec .tpc .compressionTypeMask & GPUSettings::CompressionTruncate) {
412- GPUTPCCompression::truncateSignificantBitsChargeMax (tmpClusters[k].qMax , param ());
413- GPUTPCCompression::truncateSignificantBitsCharge (tmpClusters[k].qTot , param ());
414- GPUTPCCompression::truncateSignificantBitsWidth (tmpClusters[k].sigmaPadPacked , param ());
415- GPUTPCCompression::truncateSignificantBitsWidth (tmpClusters[k].sigmaTimePacked , param ());
416- }
417- }
418- std::sort (tmpClusters.begin (), tmpClusters.end ());
419- for (unsigned int k = 0 ; k < original->nClusters [i][j]; k++) {
420- const o2::tpc::ClusterNative& c1 = tmpClusters[k];
421- const o2::tpc::ClusterNative& c2 = decoded->clusters [i][j][k];
422- if (!(c1 == c2)) {
423- if (decodingErrors++ < 100 ) {
424- GPUWarning (" Cluster mismatch: slice %2u row %3u hit %5u: %6d %3d %4d %3d %3d %4d %4d" , i, j, k, (int )c1.getTimePacked (), (int )c1.getFlags (), (int )c1.padPacked , (int )c1.sigmaTimePacked , (int )c1.sigmaPadPacked , (int )c1.qMax , (int )c1.qTot );
425- GPUWarning (" %45s %6d %3d %4d %3d %3d %4d %4d" , " " , (int )c2.getTimePacked (), (int )c2.getFlags (), (int )c2.padPacked , (int )c2.sigmaTimePacked , (int )c2.sigmaPadPacked , (int )c2.qMax , (int )c2.qTot );
426- }
427- }
428- }
429- }
430- }
431- if (decodingErrors) {
432- GPUWarning (" Errors during cluster decoding %u\n " , decodingErrors);
433- } else {
434- GPUInfo (" Cluster decoding verification on GPU: PASSED" );
435- }
436- }
437- delete[] original->clustersLinear ;
438- delete original;
439390 mRec ->PopNonPersistentMemory (RecoStep::TPCDecompression, qStr2Tag (" TPCDCMPR" ));
440391 }
441392#endif
0 commit comments