Project
Loading...
Searching...
No Matches
GPUChain.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 "GPUChain.h"
16using namespace o2::gpu;
17
20
21GPUChain::krnlExec GPUChain::GetGrid(uint32_t totalItems, uint32_t nThreads, int32_t stream, GPUReconstruction::krnlDeviceType d, GPUCA_RECO_STEP st)
22{
23 const uint32_t nBlocks = (totalItems + nThreads - 1) / nThreads;
24 return {nBlocks, nThreads, stream, d, st};
25}
26
27GPUChain::krnlExec GPUChain::GetGrid(uint32_t totalItems, int32_t stream, GPUReconstruction::krnlDeviceType d, GPUCA_RECO_STEP st)
28{
29 return {(uint32_t)-1, totalItems, stream, d, st};
30}
31
33{
34 return {(uint32_t)-2, nBlocks, stream, d, st};
35}
36
37GPUChain::krnlExec GPUChain::GetGridBlkStep(uint32_t nBlocks, int32_t stream, GPUCA_RECO_STEP st)
38{
39 return {(uint32_t)-2, nBlocks, stream, GPUReconstruction::krnlDeviceType::Auto, st};
40}
41
43{
44 return {(uint32_t)-3, 0, stream, d, st};
45}
46
48{
49 return {(uint32_t)-3, 0, stream, GPUReconstruction::krnlDeviceType::Auto, st};
50}
benchmark::State & st
krnlExec GetGridBlk(uint32_t nBlocks, int32_t stream, GPUReconstruction::krnlDeviceType d=GPUReconstruction::krnlDeviceType::Auto, GPUCA_RECO_STEP st=GPUCA_RECO_STEP::NoRecoStep)
Definition GPUChain.cxx:32
krnlExec GetGridAuto(int32_t stream, GPUReconstruction::krnlDeviceType d=GPUReconstruction::krnlDeviceType::Auto, GPUCA_RECO_STEP st=GPUCA_RECO_STEP::NoRecoStep)
Definition GPUChain.cxx:42
static constexpr krnlRunRange krnlRunRangeNone
Definition GPUChain.h:37
static constexpr krnlEvent krnlEventNone
Definition GPUChain.h:38
krnlExec GetGridAutoStep(int32_t stream, GPUCA_RECO_STEP st=GPUCA_RECO_STEP::NoRecoStep)
Definition GPUChain.cxx:47
krnlExec GetGrid(uint32_t totalItems, uint32_t nThreads, int32_t stream, GPUReconstruction::krnlDeviceType d=GPUReconstruction::krnlDeviceType::Auto, GPUCA_RECO_STEP st=GPUCA_RECO_STEP::NoRecoStep)
Definition GPUChain.cxx:21
krnlExec GetGridBlkStep(uint32_t nBlocks, int32_t stream, GPUCA_RECO_STEP st=GPUCA_RECO_STEP::NoRecoStep)
Definition GPUChain.cxx:37
GLuint GLuint stream
Definition glcorearb.h:1806