Project
Loading...
Searching...
No Matches
GPUTPCCompression.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
14
15#include "GPUTPCCompression.h"
16#include "GPUReconstruction.h"
17#include "GPUO2DataTypes.h"
19
20using namespace o2::gpu;
21
23
29
36
38{
40 if (mRec->GetProcessingSettings().tpcCompressionGatherMode >= 2) {
42 }
43 if (mRec->GetProcessingSettings().tpcCompressionGatherMode != 1) {
45 }
46 return mem;
47}
48
57
58template <class T>
59void GPUTPCCompression::SetPointersCompressedClusters(void*& mem, T& c, uint32_t nClA, uint32_t nTr, uint32_t nClU, bool reducedClA)
60{
61 computePointerWithAlignment(mem, c.qTotU, nClU); // Do not reorder, qTotU ist used as first address in GPUChainTracking::RunTPCCompression
62 computePointerWithAlignment(mem, c.qMaxU, nClU);
63 computePointerWithAlignment(mem, c.flagsU, nClU);
64 computePointerWithAlignment(mem, c.padDiffU, nClU);
65 computePointerWithAlignment(mem, c.timeDiffU, nClU);
66 computePointerWithAlignment(mem, c.sigmaPadU, nClU);
67 computePointerWithAlignment(mem, c.sigmaTimeU, nClU);
68 computePointerWithAlignment(mem, c.nSliceRowClusters, GPUCA_ROW_COUNT * NSECTORS);
69
70 uint32_t nClAreduced = reducedClA ? nClA - nTr : nClA;
71
72 if (!(mRec->GetParam().rec.tpc.compressionTypeMask & GPUSettings::CompressionTrackModel)) {
73 return; // Track model disabled, do not allocate memory
74 }
75 computePointerWithAlignment(mem, c.qTotA, nClA);
76 computePointerWithAlignment(mem, c.qMaxA, nClA);
77 computePointerWithAlignment(mem, c.flagsA, nClA);
78 computePointerWithAlignment(mem, c.rowDiffA, nClAreduced);
79 computePointerWithAlignment(mem, c.sliceLegDiffA, nClAreduced);
80 computePointerWithAlignment(mem, c.padResA, nClAreduced);
81 computePointerWithAlignment(mem, c.timeResA, nClAreduced);
82 computePointerWithAlignment(mem, c.sigmaPadA, nClA);
83 computePointerWithAlignment(mem, c.sigmaTimeA, nClA);
84
85 computePointerWithAlignment(mem, c.qPtA, nTr);
86 computePointerWithAlignment(mem, c.rowA, nTr);
87 computePointerWithAlignment(mem, c.sliceA, nTr);
88 computePointerWithAlignment(mem, c.timeA, nTr);
89 computePointerWithAlignment(mem, c.padA, nTr);
90
91 computePointerWithAlignment(mem, c.nTrackClusters, nTr);
92}
93
101
116
#define GPUCA_ROW_COUNT
uint32_t c
Definition RawData.h:2
GPUReconstruction * mRec
static void computePointerWithAlignment(T *&basePtr, S *&objPtr, size_t nEntries=1)
static void computePointerWithoutAlignment(T *&basePtr, S *&objPtr, size_t nEntries=1)
const GPUParam & GetParam() const
int16_t RegisterMemoryAllocation(T *proc, void *(T::*setPtr)(void *), int32_t type, const char *name="", const GPUMemoryReuse &re=GPUMemoryReuse())
const GPUConstantMem & GetConstantMem() const
GPUMemorySizeScalers * MemoryScalers()
const GPUSettingsProcessing & GetProcessingSettings() const
void * SetPointersOutputHost(void *mem)
void SetPointersCompressedClusters(void *&mem, T &c, uint32_t nClA, uint32_t nTr, uint32_t nClU, bool reducedClA)
o2::tpc::CompressedClusters * mOutput
void * SetPointersMemory(void *mem)
void * SetPointersOutputGPU(void *mem)
static constexpr uint32_t NSECTORS
o2::tpc::CompressedClusters * mOutputA
o2::tpc::CompressedClustersPtrs mPtrs
void * SetPointersOutput(void *mem)
o2::tpc::CompressedClustersFlat * mOutputFlat
void SetMaxData(const GPUTrackingInOutPointers &io)
void * SetPointersScratch(void *mem)
size_t NTPCUnattachedHitsBase1024(int32_t type)
const o2::tpc::ClusterNativeAccess * clustersNative