Project
Loading...
Searching...
No Matches
GPUTPCCFCheckPadBaseline.h
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
18
19
#ifndef O2_GPU_GPU_TPC_CF_CHECK_PAD_BASELINE_H
20
#define O2_GPU_GPU_TPC_CF_CHECK_PAD_BASELINE_H
21
22
#include "
GPUGeneralKernels.h
"
23
#include "
GPUConstantMem.h
"
24
#include "
GPUTPCGeometry.h
"
25
26
#include "
clusterFinderDefs.h
"
27
#include "
CfArray2D.h
"
28
29
namespace
o2::gpu
30
{
31
32
class
GPUTPCCFCheckPadBaseline
:
public
GPUKernelTemplate
33
{
34
35
public
:
36
enum
{
37
PadsPerCacheline
=
TPCMapMemoryLayout<uint16_t>::Width
,
38
TimebinsPerCacheline
=
TPCMapMemoryLayout<uint16_t>::Height
,
39
EntriesPerCacheline
=
PadsPerCacheline
*
TimebinsPerCacheline
,
40
NumOfCachedPads
= GPUCA_WARP_SIZE /
TimebinsPerCacheline
,
41
NumCLsPerWarp
= GPUCA_WARP_SIZE /
EntriesPerCacheline
,
42
NumOfCachedTBs
=
TimebinsPerCacheline
,
43
// Threads index shared memory as [iThread / MaxNPadsPerRow][iThread % MaxNPadsPerRow].
44
// Rounding up to a multiple of PadsPerCacheline ensures iThread / MaxNPadsPerRow < NumOfCachedTBs
45
// for all threads, avoiding out-of-bounds access.
46
MaxNPadsPerRow
= CAMath::nextMultipleOf<PadsPerCacheline>(GPUTPCGeometry::MaxNPadsPerRow()),
47
};
48
49
struct
GPUSharedMemory
{
50
tpccf::Charge
charges
[
NumOfCachedTBs
][
MaxNPadsPerRow
];
51
};
52
53
typedef
GPUTPCClusterFinder
processorType
;
54
GPUhdi
() static
processorType
* Processor(
GPUConstantMem
&
processors
)
55
{
56
return
processors
.tpcClusterer;
57
}
58
59
GPUhdi
() constexpr static gpudatatypes::RecoStep GetRecoStep()
60
{
61
return
gpudatatypes::RecoStep::TPCClusterFinding
;
62
}
63
64
static
int32_t
GetNBlocks
(
bool
isGPU)
65
{
66
// Important to exclude rightmost padding from Pad Filter.
67
// There's nothing to filter there and padding is counted as start of a row, so it causes an overflow in the row count.
68
const
int32_t nBlocksCPU = (
TPC_CLUSTERER_STRIDED_PAD_COUNT
-
GPUCF_PADDING_PAD
) /
PadsPerCacheline
;
69
return
isGPU ?
GPUTPCGeometry::NROWS
: nBlocksCPU;
70
}
71
72
template
<
int
32_t iKernel = defaultKernel>
73
GPUd
() static
void
Thread(int32_t nBlocks, int32_t
nThreads
, int32_t
iBlock
, int32_t
iThread
,
GPUSharedMemory
&
smem
,
processorType
&
clusterer
);
74
75
private:
76
GPUd
() static
void
CheckBaselineGPU(int32_t nBlocks, int32_t
nThreads
, int32_t
iBlock
, int32_t
iThread
,
GPUSharedMemory
&
smem
,
processorType
&
clusterer
);
77
GPUd
() static
void
CheckBaselineCPU(int32_t nBlocks, int32_t
nThreads
, int32_t
iBlock
, int32_t
iThread
,
GPUSharedMemory
&
smem
,
processorType
&
clusterer
);
78
79
GPUd
() static
void
updatePadBaseline(int32_t pad, const
GPUTPCClusterFinder
&, int32_t totalCharges, int32_t consecCharges, tpccf::Charge maxCharge);
80
};
81
82
}
// namespace o2::gpu
83
84
#endif
CfArray2D.h
GPUConstantMem.h
GPUGeneralKernels.h
GPUTPCGeometry.h
o2::gpu::GPUKernelTemplate
Definition
GPUGeneralKernels.h:41
o2::gpu::GPUKernelTemplate::processors
int32_t int32_t int32_t processorType & processors
Definition
GPUGeneralKernels.h:89
o2::gpu::GPUTPCCFCheckPadBaseline
Definition
GPUTPCCFCheckPadBaseline.h:33
o2::gpu::GPUTPCCFCheckPadBaseline::GPUhdi
GPUhdi() const expr static gpudatatypes
Definition
GPUTPCCFCheckPadBaseline.h:59
o2::gpu::GPUTPCCFCheckPadBaseline::smem
int32_t int32_t int32_t GPUSharedMemory & smem
Definition
GPUTPCCFCheckPadBaseline.h:73
o2::gpu::GPUTPCCFCheckPadBaseline::GPUd
GPUd() static void Thread(int32_t nBlocks
o2::gpu::GPUTPCCFCheckPadBaseline::NumOfCachedPads
@ NumOfCachedPads
Definition
GPUTPCCFCheckPadBaseline.h:40
o2::gpu::GPUTPCCFCheckPadBaseline::NumCLsPerWarp
@ NumCLsPerWarp
Definition
GPUTPCCFCheckPadBaseline.h:41
o2::gpu::GPUTPCCFCheckPadBaseline::NumOfCachedTBs
@ NumOfCachedTBs
Definition
GPUTPCCFCheckPadBaseline.h:42
o2::gpu::GPUTPCCFCheckPadBaseline::EntriesPerCacheline
@ EntriesPerCacheline
Definition
GPUTPCCFCheckPadBaseline.h:39
o2::gpu::GPUTPCCFCheckPadBaseline::TimebinsPerCacheline
@ TimebinsPerCacheline
Definition
GPUTPCCFCheckPadBaseline.h:38
o2::gpu::GPUTPCCFCheckPadBaseline::PadsPerCacheline
@ PadsPerCacheline
Definition
GPUTPCCFCheckPadBaseline.h:37
o2::gpu::GPUTPCCFCheckPadBaseline::MaxNPadsPerRow
@ MaxNPadsPerRow
Definition
GPUTPCCFCheckPadBaseline.h:46
o2::gpu::GPUTPCCFCheckPadBaseline::nThreads
int32_t nThreads
Definition
GPUTPCCFCheckPadBaseline.h:73
o2::gpu::GPUTPCCFCheckPadBaseline::processorType
GPUTPCClusterFinder processorType
Definition
GPUTPCCFCheckPadBaseline.h:53
o2::gpu::GPUTPCCFCheckPadBaseline::clusterer
int32_t int32_t int32_t GPUSharedMemory processorType & clusterer
Definition
GPUTPCCFCheckPadBaseline.h:73
o2::gpu::GPUTPCCFCheckPadBaseline::GPUhdi
GPUhdi() static processorType *Processor(GPUConstantMem &processors)
Definition
GPUTPCCFCheckPadBaseline.h:54
o2::gpu::GPUTPCCFCheckPadBaseline::iBlock
int32_t int32_t iBlock
Definition
GPUTPCCFCheckPadBaseline.h:73
o2::gpu::GPUTPCCFCheckPadBaseline::GetNBlocks
static int32_t GetNBlocks(bool isGPU)
Definition
GPUTPCCFCheckPadBaseline.h:64
o2::gpu::GPUTPCCFCheckPadBaseline::iThread
int32_t int32_t int32_t iThread
Definition
GPUTPCCFCheckPadBaseline.h:73
o2::gpu::GPUTPCClusterFinder
Definition
GPUTPCClusterFinder.h:53
o2::gpu::GPUTPCGeometry::NROWS
static constexpr uint32_t NROWS
Definition
GPUTPCGeometry.h:108
o2::gpu::LinearLayout
Definition
CfArray2D.h:73
clusterFinderDefs.h
GPUCF_PADDING_PAD
#define GPUCF_PADDING_PAD
Definition
clusterFinderDefs.h:37
TPC_CLUSTERER_STRIDED_PAD_COUNT
#define TPC_CLUSTERER_STRIDED_PAD_COUNT
Definition
clusterFinderDefs.h:46
o2::gpu::gpudatatypes::RecoStep::TPCClusterFinding
@ TPCClusterFinding
o2::gpu::tpccf::Charge
float Charge
Definition
clusterFinderDefs.h:73
o2::gpu
Definition
TrackTRD.h:36
o2::gpu::GPUConstantMem
Definition
GPUConstantMem.h:41
o2::gpu::GPUTPCCFCheckPadBaseline::GPUSharedMemory
Definition
GPUTPCCFCheckPadBaseline.h:49
o2::gpu::GPUTPCCFCheckPadBaseline::GPUSharedMemory::charges
tpccf::Charge charges[NumOfCachedTBs][MaxNPadsPerRow]
Definition
GPUTPCCFCheckPadBaseline.h:50
GPU
GPUTracking
TPCClusterFinder
GPUTPCCFCheckPadBaseline.h
Generated on Sun May 10 2026 00:58:44 for Project by
1.9.8