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
20
21#ifndef GPUCA_GPUCODE_DEVICE
22#include <type_traits>
23#endif
24
25using namespace o2::gpu;
26
27template <int32_t I, class T>
28GPUdii() void GPUTRDTrackerKernels::Thread(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread, GPUsharedref() GPUSharedMemory& smem, processorType& processors, T* externalInstance)
29{
30 auto* trdTracker = &processors.getTRDTracker<I>();
31#ifndef GPUCA_GPUCODE_DEVICE
32 if constexpr (std::is_same_v<decltype(trdTracker), decltype(externalInstance)>) {
33 if (externalInstance) {
34 trdTracker = externalInstance;
35 }
36 }
37#endif
38 GPUCA_TBB_KERNEL_LOOP(trdTracker->GetRec(), int32_t, i, trdTracker->NTracks(), {
39 trdTracker->DoTrackingThread(i, get_global_id(0));
40 });
41}
42
43#if !defined(GPUCA_GPUCODE) || defined(GPUCA_GPUCODE_DEVICE) // FIXME: DR: WORKAROUND to avoid CUDA bug creating host symbols for device code.
44template GPUdni() void GPUTRDTrackerKernels::Thread<0>(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread, GPUsharedref() GPUSharedMemory& smem, processorType& processors, GPUTRDTrackerGPU* externalInstance);
45template GPUdni() void GPUTRDTrackerKernels::Thread<1>(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread, GPUsharedref() GPUSharedMemory& smem, processorType& processors, GPUTRDTracker* externalInstance);
46#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)