forked from AliceO2Group/AliceO2
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathGPUO2InterfaceConfiguration.h
More file actions
102 lines (87 loc) · 3.11 KB
/
GPUO2InterfaceConfiguration.h
File metadata and controls
102 lines (87 loc) · 3.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
/// \file GPUO2InterfaceConfiguration.h
/// \author David Rohr
#ifndef GPUO2INTERFACECONFIGURATION_H
#define GPUO2INTERFACECONFIGURATION_H
#include "GPUO2ExternalUser.h"
#include "GPUSettings.h"
#include "GPUDataTypes.h"
#include "GPUHostDataTypes.h"
#include "GPUOutputControl.h"
#include "DataFormatsTPC/Constants.h"
#include <memory>
#include <array>
#include <vector>
#include <functional>
#include <gsl/gsl> // TODO: Get rid of gsl
class TH1F;
class TH1D;
class TH2F;
class TGraphAsymmErrors;
namespace o2
{
namespace tpc
{
class TrackTPC;
class Digit;
} // namespace tpc
namespace gpu
{
class TPCFastTransform;
class GPUReconstruction;
struct GPUSettingsO2;
struct GPUInterfaceQAOutputs {
const std::vector<TH1F>* hist1 = nullptr;
const std::vector<TH2F>* hist2 = nullptr;
const std::vector<TH1D>* hist3 = nullptr;
const std::vector<TGraphAsymmErrors>* hist4 = nullptr;
bool newQAHistsCreated = false;
};
struct GPUInterfaceOutputs : public GPUTrackingOutputs {
GPUInterfaceQAOutputs qa;
};
struct GPUInterfaceInputUpdate {
std::function<void(GPUTrackingInOutPointers*& data, GPUInterfaceOutputs*& outputs)> callback; // Callback which provides final data ptrs / outputRegions after Clusterization stage
std::function<void()> notifyCallback; // Callback called to notify that Clusterization state has finished without update
};
// Full configuration structure with all available settings of GPU...
struct GPUO2InterfaceConfiguration {
GPUO2InterfaceConfiguration() = default;
~GPUO2InterfaceConfiguration() = default;
GPUO2InterfaceConfiguration(const GPUO2InterfaceConfiguration&) = default;
// Settings for the Interface class
struct GPUInterfaceSettings {
bool outputToExternalBuffers = false;
// These constants affect GPU memory allocation only and do not limit the CPU processing
uint64_t maxTPCZS = 8192ul * 1024 * 1024;
uint32_t maxTPCHits = 1024 * 1024 * 1024;
uint32_t maxTRDTracklets = 128 * 1024;
uint32_t maxITSTracks = 96 * 1024;
};
GPUSettingsDeviceBackend configDeviceBackend;
GPUSettingsProcessing configProcessing;
GPUSettingsGRP configGRP;
GPUSettingsRec configReconstruction;
GPUSettingsDisplay configDisplay;
GPUSettingsQA configQA;
GPUInterfaceSettings configInterface;
GPURecoStepConfiguration configWorkflow;
GPUCalibObjectsConst configCalib;
GPUSettingsO2 ReadConfigurableParam();
static GPUSettingsO2 ReadConfigurableParam(GPUO2InterfaceConfiguration& obj);
void PrintParam();
private:
void PrintParam_internal();
};
} // namespace gpu
} // namespace o2
#endif