From 2b29e9d3b8c711126d2563e0b9c70a50ac47563a Mon Sep 17 00:00:00 2001 From: David Rohr Date: Tue, 26 Nov 2024 16:31:55 +0100 Subject: [PATCH] GPU TPC: Fix typo in name, and clean up setting of inputGPU struct --- .../DataFormatsTPC/CompressedClusters.h | 2 +- .../DataCompression/GPUTPCDecompression.cxx | 2 +- .../Global/GPUChainTrackingCompression.cxx | 34 ++----------------- 3 files changed, 4 insertions(+), 34 deletions(-) diff --git a/DataFormats/Detectors/TPC/include/DataFormatsTPC/CompressedClusters.h b/DataFormats/Detectors/TPC/include/DataFormatsTPC/CompressedClusters.h index 9f49884035b7e..46da2da2a702e 100644 --- a/DataFormats/Detectors/TPC/include/DataFormatsTPC/CompressedClusters.h +++ b/DataFormats/Detectors/TPC/include/DataFormatsTPC/CompressedClusters.h @@ -29,7 +29,7 @@ struct CompressedClustersCounters { unsigned int nUnattachedClusters = 0; unsigned int nAttachedClustersReduced = 0; unsigned int nSliceRows = 36 * 152; - unsigned char nComppressionModes = 0; + unsigned char nComppressionModes = 0; // Don't fix this name due to ROOT dictionaries! float solenoidBz = -1e6f; int maxTimeBin = -1e6; diff --git a/GPU/GPUTracking/DataCompression/GPUTPCDecompression.cxx b/GPU/GPUTracking/DataCompression/GPUTPCDecompression.cxx index 4039ebb0c100d..0f7acfce86094 100644 --- a/GPU/GPUTracking/DataCompression/GPUTPCDecompression.cxx +++ b/GPU/GPUTracking/DataCompression/GPUTPCDecompression.cxx @@ -43,7 +43,7 @@ void GPUTPCDecompression::SetPointersCompressedClusters(void*& mem, T& c, uint32 uint32_t nClAreduced = reducedClA ? nClA - nTr : nClA; - if (!(mRec->GetParam().rec.tpc.compressionTypeMask & GPUSettings::CompressionTrackModel)) { + if (!(c.nComppressionModes & GPUSettings::CompressionTrackModel)) { return; // Track model disabled, do not allocate memory } computePointerWithAlignment(mem, c.qTotA, nClA); diff --git a/GPU/GPUTracking/Global/GPUChainTrackingCompression.cxx b/GPU/GPUTracking/Global/GPUChainTrackingCompression.cxx index 98109447de034..b11b7d3b11cab 100644 --- a/GPU/GPUTracking/Global/GPUChainTrackingCompression.cxx +++ b/GPU/GPUTracking/Global/GPUChainTrackingCompression.cxx @@ -254,40 +254,10 @@ int32_t GPUChainTracking::RunTPCDecompression() int32_t inputStream = 0; int32_t unattachedStream = mRec->NStreams() - 1; - inputGPU.nAttachedClusters = cmprClsHost.nAttachedClusters; - inputGPU.nUnattachedClusters = cmprClsHost.nUnattachedClusters; - inputGPU.nTracks = cmprClsHost.nTracks; - inputGPU.nAttachedClustersReduced = inputGPU.nAttachedClusters - inputGPU.nTracks; - inputGPU.nSliceRows = NSLICES * GPUCA_ROW_COUNT; - inputGPU.nComppressionModes = param().rec.tpc.compressionTypeMask; - inputGPU.solenoidBz = param().bzkG; - inputGPU.maxTimeBin = param().continuousMaxTimeBin; + inputGPU = cmprClsHost; SetupGPUProcessor(&Decompressor, true); WriteToConstantMemory(myStep, (char*)&processors()->tpcDecompressor - (char*)processors(), &DecompressorShadow, sizeof(DecompressorShadow), inputStream); - - inputGPU.nTrackClusters = cmprClsHost.nTrackClusters; - inputGPU.qTotU = cmprClsHost.qTotU; - inputGPU.qMaxU = cmprClsHost.qMaxU; - inputGPU.flagsU = cmprClsHost.flagsU; - inputGPU.padDiffU = cmprClsHost.padDiffU; - inputGPU.timeDiffU = cmprClsHost.timeDiffU; - inputGPU.sigmaPadU = cmprClsHost.sigmaPadU; - inputGPU.sigmaTimeU = cmprClsHost.sigmaTimeU; - inputGPU.nSliceRowClusters = cmprClsHost.nSliceRowClusters; - inputGPU.qTotA = cmprClsHost.qTotA; - inputGPU.qMaxA = cmprClsHost.qMaxA; - inputGPU.flagsA = cmprClsHost.flagsA; - inputGPU.rowDiffA = cmprClsHost.rowDiffA; - inputGPU.sliceLegDiffA = cmprClsHost.sliceLegDiffA; - inputGPU.padResA = cmprClsHost.padResA; - inputGPU.timeResA = cmprClsHost.timeResA; - inputGPU.sigmaPadA = cmprClsHost.sigmaPadA; - inputGPU.sigmaTimeA = cmprClsHost.sigmaTimeA; - inputGPU.qPtA = cmprClsHost.qPtA; - inputGPU.rowA = cmprClsHost.rowA; - inputGPU.sliceA = cmprClsHost.sliceA; - inputGPU.timeA = cmprClsHost.timeA; - inputGPU.padA = cmprClsHost.padA; + inputGPU = cmprClsHost; bool toGPU = true; runKernel({GetGridAutoStep(inputStream, RecoStep::TPCDecompression), krnlRunRangeNone, &mEvents->init}, DecompressorShadow.mNativeClustersIndex, NSLICES * GPUCA_ROW_COUNT * sizeof(DecompressorShadow.mNativeClustersIndex[0]));