Project
Loading...
Searching...
No Matches
GPUTPCNNClusterizerKernels.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
14
15
#ifndef O2_GPU_NN_CLUSTERIZER_H
16
#define O2_GPU_NN_CLUSTERIZER_H
17
18
#include "
clusterFinderDefs.h
"
19
#include "
GPUGeneralKernels.h
"
20
#include "
GPUConstantMem.h
"
21
#include "
GPUTPCClusterFinder.h
"
22
#include "
CfArray2D.h
"
23
#include "
PackedCharge.h
"
24
#include "
GPUTPCNNClusterizer.h
"
25
26
namespace
o2::tpc
27
{
28
struct
ClusterNative;
29
}
// namespace o2::tpc
30
31
namespace
o2::gpu
32
{
33
34
class
ClusterAccumulator;
35
class
MCLabelAccumulator;
36
37
class
GPUTPCNNClusterizerKernels
:
public
GPUKernelTemplate
38
{
39
public
:
40
// Must all have same number of threads, since they use a common SCRATCH_PAD_WORK_GROUP_SIZE below
41
static
constexpr
size_t
SCRATCH_PAD_WORK_GROUP_SIZE
=
GPUCA_GET_THREAD_COUNT
(GPUCA_LB_GPUTPCNNClusterizerKernels_runCfClusterizer);
42
struct
GPUSharedMemory
{
43
// Regular cluster finder
44
CfChargePos
posBcast
[
SCRATCH_PAD_WORK_GROUP_SIZE
];
45
PackedCharge
buf
[
SCRATCH_PAD_WORK_GROUP_SIZE
*
SCRATCH_PAD_BUILD_N
];
46
uint8_t
innerAboveThreshold
[
SCRATCH_PAD_WORK_GROUP_SIZE
];
47
};
48
49
GPUhdi
() constexpr static
GPUDataTypes
::RecoStep GetRecoStep()
50
{
51
return
GPUDataTypes::RecoStep::TPCClusterFinding
;
52
}
53
54
enum
K
:
int32_t
{
55
runCfClusterizer
= 0,
56
fillInputNNCPU
= 1,
57
fillInputNNGPU
= 2,
58
determineClass1Labels
= 3,
59
determineClass2Labels
= 4,
60
publishClass1Regression
= 5,
61
publishClass2Regression
= 6,
62
publishDeconvolutionFlags
= 7,
63
};
64
65
template
<
int32_t
iKernel =
defaultKernel
,
typename
...
Args
>
66
GPUd
() static
void
Thread(
int32_t
,
int32_t
,
int32_t
,
int32_t
,
GPUSharedMemory
&, processorType&,
uint8_t
= 0,
int8_t
= 0,
int8_t
= 0,
uint
= 0,
Args
...);
67
68
private:
69
static
GPUd
()
void
fillInputData(
int32_t
,
int32_t
,
int32_t
,
int32_t
, processorType&,
uint8_t
,
int8_t
,
uint
);
70
static
GPUd
()
void
publishClustersReg1(
uint
,
GPUSharedMemory
&, processorType&,
uint8_t
,
int8_t
,
int8_t
,
uint
);
71
static
GPUd
() uint32_t sortIntoBuckets(
GPUTPCClusterFinder
&, const tpc::ClusterNative&, uint32_t, uint32_t, uint32_t*, tpc::ClusterNative*, uint32_t);
72
static
GPUd
()
void
publishClustersReg2(
uint
,
GPUSharedMemory
&, processorType&,
uint8_t
,
int8_t
,
int8_t
,
uint
);
73
74
static
GPUd
()
int32_t
padOffset(
int32_t
,
int32_t
);
75
static
GPUd
()
int32_t
rowOffset(
int32_t
,
int32_t
);
76
static
GPUd
()
bool
isBoundary(
int32_t
,
int32_t
,
int32_t
);
77
};
78
79
}
// namespace o2::gpu
80
81
#endif
CfArray2D.h
GPUConstantMem.h
GPUCA_GET_THREAD_COUNT
#define GPUCA_GET_THREAD_COUNT(...)
Definition
GPUDefParametersWrapper.h:35
GPUGeneralKernels.h
GPUTPCClusterFinder.h
GPUTPCNNClusterizer.h
PackedCharge.h
o2::gpu::GPUDataTypes
Definition
GPUDataTypes.h:115
o2::gpu::GPUDataTypes::RecoStep::TPCClusterFinding
@ TPCClusterFinding
o2::gpu::GPUKernelTemplate
Definition
GPUGeneralKernels.h:40
o2::gpu::GPUKernelTemplate::defaultKernel
@ defaultKernel
Definition
GPUGeneralKernels.h:42
o2::gpu::GPUTPCClusterFinder
Definition
GPUTPCClusterFinder.h:53
o2::gpu::GPUTPCNNClusterizerKernels
Definition
GPUTPCNNClusterizerKernels.h:38
o2::gpu::GPUTPCNNClusterizerKernels::GPUhdi
GPUhdi() const expr static GPUDataTypes
Definition
GPUTPCNNClusterizerKernels.h:49
o2::gpu::GPUTPCNNClusterizerKernels::uint8_t
GPUSharedMemory processorType uint8_t
Definition
GPUTPCNNClusterizerKernels.h:66
o2::gpu::GPUTPCNNClusterizerKernels::GPUd
GPUd() static void Thread(int32_t
o2::gpu::GPUTPCNNClusterizerKernels::SCRATCH_PAD_WORK_GROUP_SIZE
static constexpr size_t SCRATCH_PAD_WORK_GROUP_SIZE
Definition
GPUTPCNNClusterizerKernels.h:41
o2::gpu::GPUTPCNNClusterizerKernels::Args
GPUSharedMemory processorType Args
Definition
GPUTPCNNClusterizerKernels.h:66
o2::gpu::GPUTPCNNClusterizerKernels::int8_t
GPUSharedMemory processorType int8_t
Definition
GPUTPCNNClusterizerKernels.h:66
o2::gpu::GPUTPCNNClusterizerKernels::int32_t
int32_t
Definition
GPUTPCNNClusterizerKernels.h:66
o2::gpu::GPUTPCNNClusterizerKernels::K
K
Definition
GPUTPCNNClusterizerKernels.h:54
o2::gpu::GPUTPCNNClusterizerKernels::runCfClusterizer
@ runCfClusterizer
Definition
GPUTPCNNClusterizerKernels.h:55
o2::gpu::GPUTPCNNClusterizerKernels::fillInputNNGPU
@ fillInputNNGPU
Definition
GPUTPCNNClusterizerKernels.h:57
o2::gpu::GPUTPCNNClusterizerKernels::fillInputNNCPU
@ fillInputNNCPU
Definition
GPUTPCNNClusterizerKernels.h:56
o2::gpu::GPUTPCNNClusterizerKernels::determineClass2Labels
@ determineClass2Labels
Definition
GPUTPCNNClusterizerKernels.h:59
o2::gpu::GPUTPCNNClusterizerKernels::publishDeconvolutionFlags
@ publishDeconvolutionFlags
Definition
GPUTPCNNClusterizerKernels.h:62
o2::gpu::GPUTPCNNClusterizerKernels::publishClass1Regression
@ publishClass1Regression
Definition
GPUTPCNNClusterizerKernels.h:60
o2::gpu::GPUTPCNNClusterizerKernels::determineClass1Labels
@ determineClass1Labels
Definition
GPUTPCNNClusterizerKernels.h:58
o2::gpu::GPUTPCNNClusterizerKernels::publishClass2Regression
@ publishClass2Regression
Definition
GPUTPCNNClusterizerKernels.h:61
o2::gpu::GPUTPCNNClusterizerKernels::uint
GPUSharedMemory processorType uint
Definition
GPUTPCNNClusterizerKernels.h:66
o2::gpu::PackedCharge
Definition
PackedCharge.h:25
clusterFinderDefs.h
SCRATCH_PAD_BUILD_N
#define SCRATCH_PAD_BUILD_N
Definition
clusterFinderDefs.h:30
buf
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition
glcorearb.h:2514
o2::gpu
Definition
TrackTRD.h:35
o2::tpc
Global TPC definitions and constants.
Definition
SimTraits.h:167
o2::gpu::CfChargePos
Definition
CfChargePos.h:25
o2::gpu::GPUTPCNNClusterizerKernels::GPUSharedMemory
Definition
GPUTPCNNClusterizerKernels.h:42
o2::gpu::GPUTPCNNClusterizerKernels::GPUSharedMemory::innerAboveThreshold
uint8_t innerAboveThreshold[SCRATCH_PAD_WORK_GROUP_SIZE]
Definition
GPUTPCNNClusterizerKernels.h:46
o2::gpu::GPUTPCNNClusterizerKernels::GPUSharedMemory::posBcast
CfChargePos posBcast[SCRATCH_PAD_WORK_GROUP_SIZE]
Definition
GPUTPCNNClusterizerKernels.h:44
GPU
GPUTracking
TPCClusterFinder
GPUTPCNNClusterizerKernels.h
Generated on Thu Jul 31 2025 23:58:41 for Project by
1.9.8