Project
Loading...
Searching...
No Matches
GPUProcessor.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 "GPUProcessor.h"
16#include "GPUReconstruction.h"
18
19using namespace o2::gpu;
20
21GPUProcessor::GPUProcessor() : mRec(nullptr), mGPUProcessorType(PROCESSOR_TYPE_CPU), mLinkedProcessor(nullptr), mConstantMem(nullptr), mAllocateAndInitializeLate(false) {}
22
24{
25 if (mRec && mRec->GetProcessingSettings().memoryAllocationStrategy == GPUMemoryResource::ALLOCATION_INDIVIDUAL) {
26 Clear();
27 }
28}
29
31{
32 mRec = rec;
34 if (slaveProcessor) {
35 slaveProcessor->mLinkedProcessor = this;
36 mLinkedProcessor = slaveProcessor;
37 }
39}
40
GPUReconstruction * mRec
void InitGPUProcessor(GPUReconstruction *rec, ProcessorType type=PROCESSOR_TYPE_CPU, GPUProcessor *slaveProcessor=nullptr)
ProcessorType mGPUProcessorType
GPUProcessor * mLinkedProcessor
void ConstructGPUProcessor(GPUProcessor *proc)
void FreeRegisteredMemory(GPUProcessor *proc, bool freeCustom=false, bool freePermanent=false)
const GPUSettingsProcessing & GetProcessingSettings() const
GLint GLint GLsizei GLint GLenum GLenum type
Definition glcorearb.h:275
GPUReconstruction * rec