Project
Loading...
Searching...
No Matches
GPUTPCDecompression.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 "GPUTPCDecompression.h"
16#include "GPUTPCCompression.h"
17#include "GPUReconstruction.h"
18#include "GPUO2DataTypes.h"
20#include "GPULogging.h"
21
22using namespace o2::gpu;
23
25
31
32template <class T>
33void GPUTPCDecompression::SetPointersCompressedClusters(void*& mem, T& c, uint32_t nClA, uint32_t nTr, uint32_t nClU, bool reducedClA)
34{
35 computePointerWithAlignment(mem, c.qTotU, nClU); // Do not reorder, qTotU ist used as first address in GPUChainTracking::RunTPCCompression
36 computePointerWithAlignment(mem, c.qMaxU, nClU);
37 computePointerWithAlignment(mem, c.flagsU, nClU);
38 computePointerWithAlignment(mem, c.padDiffU, nClU);
39 computePointerWithAlignment(mem, c.timeDiffU, nClU);
40 computePointerWithAlignment(mem, c.sigmaPadU, nClU);
41 computePointerWithAlignment(mem, c.sigmaTimeU, nClU);
42 computePointerWithAlignment(mem, c.nSliceRowClusters, GPUCA_ROW_COUNT * NSECTORS);
43
44 uint32_t nClAreduced = reducedClA ? nClA - nTr : nClA;
45
46 if (!(c.nComppressionModes & GPUSettings::CompressionTrackModel)) {
47 return; // Track model disabled, do not allocate memory
48 }
49 computePointerWithAlignment(mem, c.qTotA, nClA);
50 computePointerWithAlignment(mem, c.qMaxA, nClA);
51 computePointerWithAlignment(mem, c.flagsA, nClA);
52 computePointerWithAlignment(mem, c.rowDiffA, nClAreduced);
53 computePointerWithAlignment(mem, c.sliceLegDiffA, nClAreduced);
54 computePointerWithAlignment(mem, c.padResA, nClAreduced);
55 computePointerWithAlignment(mem, c.timeResA, nClAreduced);
56 computePointerWithAlignment(mem, c.sigmaPadA, nClA);
57 computePointerWithAlignment(mem, c.sigmaTimeA, nClA);
58
59 computePointerWithAlignment(mem, c.qPtA, nTr);
60 computePointerWithAlignment(mem, c.rowA, nTr);
61 computePointerWithAlignment(mem, c.sliceA, nTr);
62 computePointerWithAlignment(mem, c.timeA, nTr);
63 computePointerWithAlignment(mem, c.padA, nTr);
64
65 computePointerWithAlignment(mem, c.nTrackClusters, nTr);
66}
67
73
79
86
92
98
104
106{
115}
116
118{
119 mMaxNativeClustersPerBuffer = mRec->GetProcessingSettings().tpcMaxAttachedClustersPerSectorRow;
120}
#define GPUCA_ROW_COUNT
uint32_t c
Definition RawData.h:2
GPUReconstruction * mRec
static void computePointerWithAlignment(T *&basePtr, S *&objPtr, size_t nEntries=1)
int16_t RegisterMemoryAllocation(T *proc, void *(T::*setPtr)(void *), int32_t type, const char *name="", const GPUMemoryReuse &re=GPUMemoryReuse())
const GPUSettingsProcessing & GetProcessingSettings() const
void * SetPointersInputClusterNativeAccess(void *mem)
void * SetPointersTmpNativeBuffersGPU(void *mem)
void * SetPointersTmpNativeBuffersInput(void *mem)
o2::tpc::CompressedClusters mInputGPU
void * SetPointersTmpClusterNativeAccessForFiltering(void *mem)
void SetPointersCompressedClusters(void *&mem, T &c, uint32_t nClA, uint32_t nTr, uint32_t nClU, bool reducedClA)
void * SetPointersTmpNativeBuffersOutput(void *mem)
void * SetPointersNClusterPerSectorRow(void *mem)
o2::tpc::ClusterNative * mTmpNativeClusters
void SetMaxData(const GPUTrackingInOutPointers &io)
static constexpr uint32_t NSECTORS
o2::tpc::ClusterNative * mNativeClustersBuffer
o2::tpc::ClusterNativeAccess * mClusterNativeAccess