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
26namespace o2::tpc
27{
28struct ClusterNative;
29} // namespace o2::tpc
30
31namespace o2::gpu
32{
33
34class ClusterAccumulator;
35class MCLabelAccumulator;
36
38{
39 public:
40 // Must all have same number of threads, since they use a common SCRATCH_PAD_WORK_GROUP_SIZE below
41 static_assert(GPUCA_GET_THREAD_COUNT(GPUCA_LB_GPUTPCNNClusterizerKernels_fillInputNN) == GPUCA_GET_THREAD_COUNT(GPUCA_LB_GPUTPCNNClusterizerKernels_runCfClusterizer));
42 static_assert(GPUCA_GET_THREAD_COUNT(GPUCA_LB_GPUTPCNNClusterizerKernels_fillInputNNSingleElement) == GPUCA_GET_THREAD_COUNT(GPUCA_LB_GPUTPCNNClusterizerKernels_runCfClusterizer));
43 static_assert(GPUCA_GET_THREAD_COUNT(GPUCA_LB_GPUTPCNNClusterizerKernels_determineClass1Labels) == GPUCA_GET_THREAD_COUNT(GPUCA_LB_GPUTPCNNClusterizerKernels_runCfClusterizer));
44 static_assert(GPUCA_GET_THREAD_COUNT(GPUCA_LB_GPUTPCNNClusterizerKernels_determineClass2Labels) == GPUCA_GET_THREAD_COUNT(GPUCA_LB_GPUTPCNNClusterizerKernels_runCfClusterizer));
45 static_assert(GPUCA_GET_THREAD_COUNT(GPUCA_LB_GPUTPCNNClusterizerKernels_publishClass1Regression) == GPUCA_GET_THREAD_COUNT(GPUCA_LB_GPUTPCNNClusterizerKernels_runCfClusterizer));
46 static_assert(GPUCA_GET_THREAD_COUNT(GPUCA_LB_GPUTPCNNClusterizerKernels_publishClass2Regression) == GPUCA_GET_THREAD_COUNT(GPUCA_LB_GPUTPCNNClusterizerKernels_runCfClusterizer));
47 static constexpr size_t SCRATCH_PAD_WORK_GROUP_SIZE = GPUCA_GET_THREAD_COUNT(GPUCA_LB_GPUTPCNNClusterizerKernels_runCfClusterizer);
54
55 GPUhdi() constexpr static GPUDataTypes::RecoStep GetRecoStep()
56 {
58 }
59
69
70 template <int32_t iKernel = defaultKernel, typename... Args>
71 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...);
72
73 private:
74 static GPUd() void fillInputData(int32_t, int32_t, int32_t, int32_t, processorType&, uint8_t, int8_t, uint);
75 static GPUd() void publishClustersReg1(uint, GPUSharedMemory&, processorType&, uint8_t, int8_t, int8_t, uint);
76 static GPUd() void publishClustersReg2(uint, GPUSharedMemory&, processorType&, uint8_t, int8_t, int8_t, uint);
77
78 static GPUd() int padOffset(int, int);
79 static GPUd() int rowOffset(int, int);
80 static GPUd() bool isBoundary(int, int, int);
81};
82
83} // namespace o2::gpu
84
85#endif
#define GPUCA_GET_THREAD_COUNT(...)
GPUhdi() const expr static GPUDataTypes
GPUd() static void Thread(int32_t
#define SCRATCH_PAD_BUILD_N
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition glcorearb.h:2514
Global TPC definitions and constants.
Definition SimTraits.h:167