Project
Loading...
Searching...
No Matches
GPUTPCTrackletConstructor.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 GPUTPCTRACKLETCONSTRUCTOR_H
16#define GPUTPCTRACKLETCONSTRUCTOR_H
17
18#include "GPUTPCDef.h"
19#include "GPUTPCTrackParam.h"
20#include "GPUGeneralKernels.h"
21#include "GPUConstantMem.h"
22
23namespace o2::gpu
24{
29class GPUTPCTracker;
30
32{
33 public:
34 enum K {
36 allSectors = 1
37 };
38
40 {
42 public:
43#if !defined(GPUCA_GPUCODE)
45 {
46 }
47
48 GPUTPCThreadMemory(const GPUTPCThreadMemory& /*dummy*/) : mISH(0), mFirstRow(0), mLastRow(0), mStartRow(0), mEndRow(0), mCurrIH(0), mGo(0), mStage(0), mNHits(0), mNHitsEndRow(0), mNMissed(0), mLastY(0), mLastZ(0) {}
49 GPUTPCThreadMemory& operator=(const GPUTPCThreadMemory& /*dummy*/) { return *this; }
50#endif
51
52 protected:
53 // WARNING: This data is copied element by element in CopyTrackletTempData. Changes to members of this class must be reflected in CopyTrackletTempData!!!
54 int32_t mISH; // track index
55 int32_t mFirstRow; // first row index
56 int32_t mLastRow; // last row index
57 int32_t mStartRow; // row index of first hit in seed
58 int32_t mEndRow; // row index of last hit in seed
59 calink mCurrIH; // indef of the current hit
60 int8_t mGo; // do fit/searching flag
61 int32_t mStage; // reco stage
62 int32_t mNHits; // n track hits
63 int32_t mNHitsEndRow; // n hits at end row
64 int32_t mNMissed; // n missed hits during search
65 float mLastY; // Y of the last fitted cluster
66 float mLastZ; // Z of the last fitted cluster
67 };
68
71 int32_t mNextStartHitFirst; // First start hit to be processed by CUDA block during next iteration
72 int32_t mNextStartHitCount; // Number of start hits to be processed by CUDA block during next iteration
73 int32_t mNextStartHitFirstRun; // First run for dynamic scheduler?
74 int32_t mNStartHits; // Total number of start hits
75
76#ifdef GPUCA_TRACKLET_CONSTRUCTOR_DO_PROFILE
77 int32_t fMaxSync; // temporary shared variable during profile creation
78#endif // GPUCA_TRACKLET_CONSTRUCTOR_DO_PROFILE
79 };
80
81 GPUd() static void InitTracklet(GPUTPCTrackParam& tParam);
82
83 template <class T>
84 GPUd() static void UpdateTracklet(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread, GPUsharedref() T& s, GPUTPCThreadMemory& r, GPUconstantref() GPUTPCTracker& tracker, GPUTPCTrackParam& tParam, int32_t iRow, calink& rowHit, calink* rowHits);
85
86 GPUd() static void StoreTracklet(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread, GPUsharedref() GPUSharedMemory& s, GPUTPCThreadMemory& r, GPUconstantref() GPUTPCTracker& tracker, GPUTPCTrackParam& tParam, calink* rowHits);
87
88 GPUd() static bool CheckCov(GPUTPCTrackParam& tParam);
89
91
92#ifdef GPUCA_GPUCODE
93 GPUd() static int32_t FetchTracklet(GPUconstantref() GPUTPCTracker& tracker, GPUsharedref() GPUSharedMemory& sMem);
94#endif // GPUCA_GPUCODE
95
96 template <class T>
97 GPUd() static int32_t GPUTPCTrackletConstructorExtrapolationTracking(GPUconstantref() GPUTPCTracker& tracker, GPUsharedref() T& sMem, GPUTPCTrackParam& tParam, int32_t startrow, int32_t increment, int32_t iTracklet, calink* rowHits);
98
99 typedef GPUconstantref() GPUTPCTracker processorType;
100 GPUhdi() constexpr static GPUDataTypes::RecoStep GetRecoStep() { return GPUCA_RECO_STEP::TPCSectorTracking; }
101 GPUhdi() static processorType* Processor(GPUConstantMem& processors)
102 {
103 return processors.tpcTrackers;
104 }
105 template <int32_t iKernel = GPUKernelTemplate::defaultKernel>
106 GPUd() static void Thread(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread, GPUsharedref() GPUSharedMemory& smem, processorType& tracker);
107};
108
109} // namespace o2::gpu
110
111#endif // GPUTPCTRACKLETCONSTRUCTOR_H
#define GPUsharedref()
#define GPUCA_ROW_COUNT
GPUTPCThreadMemory & operator=(const GPUTPCThreadMemory &)
typedef GPUconstantref() GPUTPCTracker processorType
int32_t int32_t int32_t GPUTPCThreadMemory GPUTPCTrackParam int32_t calink & rowHit
GPUd() static void Thread(int32_t nBlocks
GPUhdi() const expr static GPUDataTypes
int32_t int32_t int32_t GPUTPCThreadMemory GPUTPCTrackParam int32_t calink calink * rowHits
GPUsharedref() GPUTPCTrackletConstructor GPUd() static int32_t GPUTPCTrackletConstructorExtrapolationTracking(GPUconstantref() GPUTPCTracker &tracker
GPUhdi() static processorType *Processor(GPUConstantMem &processors)
GPUsharedref() GPUTPCTrackletConstructor GPUTPCTrackParam int32_t int32_t int32_t iTracklet
GPUd() static void InitTracklet(GPUTPCTrackParam &tParam)
GPUd() static void UpdateTracklet(int32_t nBlocks
int32_t int32_t int32_t GPUTPCThreadMemory GPUTPCTrackParam & tParam
int32_t int32_t int32_t processorType & tracker
int32_t int32_t int32_t GPUTPCThreadMemory GPUTPCTrackParam int32_t iRow
GPUsharedref() GPUTPCTrackletConstructor GPUTPCTrackParam int32_t startrow
GPUsharedref() GPUTPCTrackletConstructor GPUTPCTrackParam int32_t int32_t increment
GLboolean r
Definition glcorearb.h:1233
uint32_t calink
Definition GPUTPCDef.h:30
CA_SHARED_STORAGE(GPUTPCRow mRows[GPUCA_ROW_COUNT])