Project
Loading...
Searching...
No Matches
GPUChainITS.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 "GPUChainITS.h"
16#include "GPUConstantMem.h"
20
21using namespace o2::gpu;
22
23namespace o2::its
24{
26{
27 public:
28 void* allocate(size_t size) final
29 {
30 return mFWReco->AllocateDirectMemory(size, mType);
31 }
32 void deallocate(char* ptr, size_t size) final {} // this is a simple no-op
33 void pushTagOnStack(uint64_t tag) final
34 {
35 mFWReco->PushNonPersistentMemory(tag);
36 }
37 void popTagOffStack(uint64_t tag) final
38 {
39 mFWReco->PopNonPersistentMemory(GPUDataTypes::RecoStep::ITSTracking, tag);
40 }
42
43 private:
45};
46} // namespace o2::its
47
49
51
52int32_t GPUChainITS::Init() { return 0; }
53
55{
56 if (mITSTrackerTraits == nullptr) {
57 mRec->GetITSTraits(&mITSTrackerTraits, nullptr, nullptr);
58 }
59 return mITSTrackerTraits.get();
60}
61
69
71{
72 if (mITSTimeFrame == nullptr) {
73 mRec->GetITSTraits(nullptr, nullptr, &mITSTimeFrame);
74 }
75#if !defined(GPUCA_STANDALONE)
76 if (mITSTimeFrame->isGPU()) {
78 mFrameworkAllocator->setReconstructionFramework(rec());
79 mITSTimeFrame->setFrameworkAllocator(mFrameworkAllocator.get());
80 }
81#endif
82 return mITSTimeFrame.get();
83}
84
85int32_t GPUChainITS::PrepareEvent() { return 0; }
86
87int32_t GPUChainITS::Finalize() { return 0; }
88
89int32_t GPUChainITS::RunChain() { return 0; }
TBranch * ptr
Definition of the ITS track.
GPUChainITS(GPUReconstruction *rec)
int32_t RunChain() override
int32_t PrepareEvent() override
std::unique_ptr< o2::its::VertexerTraits< 7 > > mITSVertexerTraits
Definition GPUChainITS.h:56
std::unique_ptr< o2::its::GPUFrameworkExternalAllocator > mFrameworkAllocator
Definition GPUChainITS.h:53
o2::its::TimeFrame< 7 > * GetITSTimeframe()
o2::its::TrackerTraits< 7 > * GetITSTrackerTraits()
std::unique_ptr< o2::its::TimeFrame< 7 > > mITSTimeFrame
Definition GPUChainITS.h:54
std::unique_ptr< o2::its::TrackerTraits< 7 > > mITSTrackerTraits
Definition GPUChainITS.h:55
int32_t Init() override
int32_t Finalize() override
o2::its::VertexerTraits< 7 > * GetITSVertexerTraits()
GPUReconstructionCPU * mRec
Definition GPUChain.h:79
GPUReconstruction * rec()
Definition GPUChain.h:66
void PopNonPersistentMemory(RecoStep step, uint64_t tag, const GPUProcessor *proc=nullptr)
void PushNonPersistentMemory(uint64_t tag)
void * AllocateDirectMemory(size_t size, int32_t type)
virtual void GetITSTraits(std::unique_ptr< o2::its::TrackerTraits< 7 > > *trackerTraits, std::unique_ptr< o2::its::VertexerTraits< 7 > > *vertexerTraits, std::unique_ptr< o2::its::TimeFrame< 7 > > *timeFrame)
void setReconstructionFramework(o2::gpu::GPUReconstruction *fwr)
void deallocate(char *ptr, size_t size) final
void popTagOffStack(uint64_t tag) final
void pushTagOnStack(uint64_t tag) final
void * allocate(size_t size) final
GLsizeiptr size
Definition glcorearb.h:659
GPUReconstruction * rec