Project
Loading...
Searching...
No Matches
GPUTrackingRefitKernel.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 "GPUROOTDump.h"
17#include "GPUTrackingRefit.h"
18
19using namespace o2::gpu;
20
21template <int32_t I>
22GPUdii() void GPUTrackingRefitKernel::Thread(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread, GPUsharedref() GPUSharedMemory& smem, processorType& GPUrestrict() processors)
23{
24 auto& refit = processors.trackingRefit;
25 for (uint32_t i = get_global_id(0); i < processors.ioPtrs.nMergedTracks; i += get_global_size(0)) {
26 if (refit.mPTracks[i].OK()) {
27 GPUTPCGMMergedTrack trk = refit.mPTracks[i];
28 int32_t retval;
29 if constexpr (I == mode0asGPU) {
30 retval = refit.RefitTrackAsGPU(trk, false, true);
31 } else if constexpr (I == mode1asTrackParCov) {
32 retval = refit.RefitTrackAsTrackParCov(trk, false, true);
33 }
34 /*#pragma omp critical
35 if (retval > 0) {
36 static auto cldump = GPUROOTDump<GPUTPCGMMergedTrack, GPUTPCGMMergedTrack>::getNew("org", "refit", "debugTree");
37 cldump.Fill(refit.mPTracks[i], trk);
38 }*/
39 if (retval > 0) {
40 refit.mPTracks[i] = trk;
41 } else {
42 refit.mPTracks[i].SetOK(false);
43 }
44 }
45 }
46}
47#if !defined(GPUCA_GPUCODE) || defined(GPUCA_GPUCODE_DEVICE) // FIXME: DR: WORKAROUND to avoid CUDA bug creating host symbols for device code.
48template GPUdni() void GPUTrackingRefitKernel::Thread<0>(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread, GPUsharedref() GPUSharedMemory& smem, processorType& GPUrestrict() processors);
49template GPUdni() void GPUTrackingRefitKernel::Thread<1>(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread, GPUsharedref() GPUSharedMemory& smem, processorType& GPUrestrict() processors);
50#endif
int32_t i
#define GPUsharedref()
#define get_global_size(dim)
#define GPUdni()
#define GPUrestrict()
#define get_global_id(dim)
GPUdii() void GPUTrackingRefitKernel
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)