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:
29
30 void* allocate(size_t size) override
31 {
32 return mFWReco->AllocateDirectMemory(size, mType);
33 }
34 void deallocate(char* ptr, size_t size) override {}
36
37 private:
40};
41} // namespace o2::its
42
48
50
51int32_t GPUChainITS::Init() { return 0; }
52
54{
55 if (mITSTrackerTraits == nullptr) {
56 mRec->GetITSTraits(&mITSTrackerTraits, nullptr, nullptr);
57 }
58 return mITSTrackerTraits.get();
59}
60
68
70{
71 if (mITSTimeFrame == nullptr) {
72 mRec->GetITSTraits(nullptr, nullptr, &mITSTimeFrame);
73 }
74#if !defined(GPUCA_STANDALONE)
75 if (mITSTimeFrame->isGPU()) {
77 mFrameworkDeviceAllocator->setReconstructionFramework(rec());
78 mITSTimeFrame->setExternalDeviceAllocator(mFrameworkDeviceAllocator.get());
80 mFrameworkHostAllocator->setReconstructionFramework(rec());
81 mITSTimeFrame->setExternalHostAllocator(mFrameworkHostAllocator.get());
82 }
83#endif
84 return mITSTimeFrame.get();
85}
86
87int32_t GPUChainITS::PrepareEvent() { return 0; }
88
89int32_t GPUChainITS::Finalize() { return 0; }
90
91int32_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:54
o2::its::TimeFrame< 7 > * GetITSTimeframe()
o2::its::TrackerTraits< 7 > * GetITSTrackerTraits()
std::unique_ptr< o2::its::TimeFrame< 7 > > mITSTimeFrame
Definition GPUChainITS.h:55
std::unique_ptr< o2::its::TrackerTraits< 7 > > mITSTrackerTraits
Definition GPUChainITS.h:53
std::unique_ptr< o2::its::GPUFrameworkExternalAllocator > mFrameworkHostAllocator
Definition GPUChainITS.h:57
int32_t Init() override
std::unique_ptr< o2::its::GPUFrameworkExternalAllocator > mFrameworkDeviceAllocator
Definition GPUChainITS.h:56
int32_t Finalize() override
o2::its::VertexerTraits< 7 > * GetITSVertexerTraits()
GPUReconstructionCPU * mRec
Definition GPUChain.h:79
GPUReconstruction * rec()
Definition GPUChain.h:66
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 * allocate(size_t size) override
GPUFrameworkExternalAllocator(GPUMemoryResource::MemoryType type)
void deallocate(char *ptr, size_t size) override
GLsizeiptr size
Definition glcorearb.h:659
GLint GLint GLsizei GLint GLenum GLenum type
Definition glcorearb.h:275
GPUReconstruction * rec