1616#include " GPUReconstruction.h"
1717#include " GPUO2DataTypes.h"
1818#include " GPUMemorySizeScalers.h"
19+ #include " GPUDefParametersRuntime.h"
1920
2021using namespace o2 ::gpu;
2122
@@ -36,20 +37,22 @@ void* GPUTPCCompression::SetPointersOutputHost(void* mem)
3637
3738void * GPUTPCCompression::SetPointersScratch (void * mem)
3839{
40+ int32_t gatherMode = mRec ->GetProcessingSettings ().tpcCompressionGatherMode == -1 ? mRec ->getGPUParameters (mRec ->GetRecoStepsGPU () & GPUDataTypes::RecoStep::TPCCompression).par_COMP_GATHER_MODE : mRec ->GetProcessingSettings ().tpcCompressionGatherMode ;
3941 computePointerWithAlignment (mem, mClusterStatus , mMaxClusters );
40- if (mRec -> GetProcessingSettings (). tpcCompressionGatherMode >= 2 ) {
42+ if (gatherMode >= 2 ) {
4143 computePointerWithAlignment (mem, mAttachedClusterFirstIndex , mMaxTracks );
4244 }
43- if (mRec -> GetProcessingSettings (). tpcCompressionGatherMode != 1 ) {
45+ if (gatherMode != 1 ) {
4446 SetPointersCompressedClusters (mem, mPtrs , mMaxTrackClusters , mMaxTracks , mMaxClustersInCache , false );
4547 }
4648 return mem;
4749}
4850
4951void * GPUTPCCompression::SetPointersOutput (void * mem)
5052{
53+ int32_t gatherMode = mRec ->GetProcessingSettings ().tpcCompressionGatherMode == -1 ? mRec ->getGPUParameters (mRec ->GetRecoStepsGPU () & GPUDataTypes::RecoStep::TPCCompression).par_COMP_GATHER_MODE : mRec ->GetProcessingSettings ().tpcCompressionGatherMode ;
5154 computePointerWithAlignment (mem, mAttachedClusterFirstIndex , mMaxTrackClusters );
52- if (mRec -> GetProcessingSettings (). tpcCompressionGatherMode == 1 ) {
55+ if (gatherMode == 1 ) {
5356 SetPointersCompressedClusters (mem, mPtrs , mMaxTrackClusters , mMaxTracks , mMaxClustersInCache , false );
5457 }
5558 return mem;
@@ -102,12 +105,13 @@ void* GPUTPCCompression::SetPointersMemory(void* mem)
102105void GPUTPCCompression::RegisterMemoryAllocation ()
103106{
104107 AllocateAndInitializeLate ();
108+ int32_t gatherMode = mRec ->GetProcessingSettings ().tpcCompressionGatherMode == -1 ? mRec ->getGPUParameters (mRec ->GetRecoStepsGPU () & GPUDataTypes::RecoStep::TPCCompression).par_COMP_GATHER_MODE : mRec ->GetProcessingSettings ().tpcCompressionGatherMode ;
105109 mMemoryResOutputHost = mRec ->RegisterMemoryAllocation (this , &GPUTPCCompression::SetPointersOutputHost, GPUMemoryResource::MEMORY_OUTPUT_FLAG | GPUMemoryResource::MEMORY_HOST | GPUMemoryResource::MEMORY_CUSTOM, " TPCCompressionOutputHost" );
106- if (mRec -> GetProcessingSettings (). tpcCompressionGatherMode == 3 ) {
110+ if (gatherMode == 3 ) {
107111 mMemoryResOutputGPU = mRec ->RegisterMemoryAllocation (this , &GPUTPCCompression::SetPointersOutputGPU, GPUMemoryResource::MEMORY_SCRATCH | GPUMemoryResource::MEMORY_GPU | GPUMemoryResource::MEMORY_CUSTOM | GPUMemoryResource::MEMORY_STACK, " TPCCompressionOutputGPU" );
108112 }
109- uint32_t stackScratch = (mRec -> GetProcessingSettings (). tpcCompressionGatherMode != 3 ) ? GPUMemoryResource::MEMORY_STACK : 0 ;
110- if (mRec -> GetProcessingSettings (). tpcCompressionGatherMode < 2 ) {
113+ uint32_t stackScratch = (gatherMode != 3 ) ? GPUMemoryResource::MEMORY_STACK : 0 ;
114+ if (gatherMode < 2 ) {
111115 mRec ->RegisterMemoryAllocation (this , &GPUTPCCompression::SetPointersOutput, GPUMemoryResource::MEMORY_OUTPUT | stackScratch, " TPCCompressionOutput" );
112116 }
113117 mRec ->RegisterMemoryAllocation (this , &GPUTPCCompression::SetPointersScratch, GPUMemoryResource::MEMORY_SCRATCH | stackScratch, " TPCCompressionScratch" );
0 commit comments