Project
Loading...
Searching...
No Matches
GPUTRDTrackerKernels.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
16#include "GPUTRDGeometry.h"
17#include "GPUConstantMem.h"
18#include "GPUCommonTypeTraits.h"
19
21
22using namespace o2::gpu;
23
24template <int32_t I, class T>
25GPUdii() void GPUTRDTrackerKernels::Thread(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread, GPUsharedref() GPUSharedMemory& smem, processorType& processors, T* externalInstance)
26{
27 auto* trdTracker = &processors.getTRDTracker<I>();
28#ifndef GPUCA_GPUCODE_DEVICE
29 if constexpr (std::is_same_v<decltype(trdTracker), decltype(externalInstance)>) {
30 if (externalInstance) {
31 trdTracker = externalInstance;
32 }
33 }
34#endif
35 GPUCA_TBB_KERNEL_LOOP(trdTracker->GetRec(), int32_t, i, trdTracker->NTracks(), {
36 trdTracker->DoTrackingThread(i, get_global_id(0));
37 });
38}
39
40#if !defined(GPUCA_GPUCODE) || defined(GPUCA_GPUCODE_DEVICE) // FIXME: DR: WORKAROUND to avoid CUDA bug creating host symbols for device code.
41template GPUdni() void GPUTRDTrackerKernels::Thread<0>(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread, GPUsharedref() GPUSharedMemory& smem, processorType& processors, GPUTRDTrackerGPU* externalInstance);
42template GPUdni() void GPUTRDTrackerKernels::Thread<1>(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread, GPUsharedref() GPUSharedMemory& smem, processorType& processors, GPUTRDTracker* externalInstance);
43#endif
int32_t i
#define GPUsharedref()
#define GPUdni()
#define GPUCA_TBB_KERNEL_LOOP(rec, vartype, varname, iEnd, code)
GPUdii() void GPUTRDTrackerKernels
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)