Project
Loading...
Searching...
No Matches
GPUO2InterfaceConfigurableParam.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
17#include "GPUDataTypes.h"
18#include "GPUConfigDump.h"
19
20using namespace o2::gpu;
21#define BeginNamespace(name)
22#define EndNamespace()
23#define AddOption(name, type, default, optname, optnameshort, help, ...)
24#define AddOptionRTC(...) AddOption(__VA_ARGS__)
25#define AddVariable(name, type, default)
26#define AddVariableRTC(...) AddVariable(__VA_ARGS__)
27#define AddOptionSet(name, type, value, optname, optnameshort, help, ...)
28#define AddOptionVec(name, type, optname, optnameshort, help, ...)
29#define AddOptionArray(name, type, count, default, optname, optnameshort, help, ...)
30#define AddOptionArrayRTC(...) AddOptionArray(__VA_ARGS__)
31#define AddSubConfig(name, instance)
32#define BeginSubConfig(name, instance, parent, preoptname, preoptnameshort, descr, o2prefix) O2ParamImpl(GPUCA_M_CAT(GPUConfigurableParam, name))
33#define BeginHiddenConfig(...)
34#define EndConfig()
35#define AddCustomCPP(...)
36#define AddHelp(...)
37#define AddShortcut(...)
38#include "GPUSettingsList.h"
39#undef BeginNamespace
40#undef EndNamespace
41#undef AddOption
42#undef AddOptionRTC
43#undef AddVariable
44#undef AddVariableRTC
45#undef AddOptionSet
46#undef AddOptionVec
47#undef AddOptionArray
48#undef AddOptionArrayRTC
49#undef AddSubConfig
50#undef BeginSubConfig
51#undef BeginHiddenConfig
52#undef EndConfig
53#undef AddCustomCPP
54#undef AddHelp
55#undef AddShortcut
56
58{
59#define BeginNamespace(name)
60#define EndNamespace()
61#define AddOption(name, type, default, optname, optnameshort, help, ...) dst.name = src.name;
62#define AddOptionRTC(...) AddOption(__VA_ARGS__)
63#define AddVariable(name, type, default)
64#define AddVariableRTC(...) AddVariable(__VA_ARGS__)
65#define AddOptionSet(name, type, value, optname, optnameshort, help, ...)
66#define AddOptionVec(name, type, optname, optnameshort, help, ...)
67#define AddOptionArray(name, type, count, default, optname, optnameshort, help, ...) \
68 for (int32_t i = 0; i < count; i++) { \
69 dst.name[i] = src.name[i]; \
70 }
71#define AddOptionArrayRTC(...) AddOptionArray(__VA_ARGS__)
72#define AddSubConfig(name, instance) dst.instance = instance;
73#define BeginSubConfig(name, instance, parent, preoptname, preoptnameshort, descr, o2prefix) \
74 name instance; \
75 { \
76 const auto& src = GPUCA_M_CAT(GPUConfigurableParam, name)::Instance(); \
77 name& dst = instance;
78#define BeginHiddenConfig(name, instance) {
79#define EndConfig() }
80#define AddCustomCPP(...)
81#define AddHelp(...)
82#define AddShortcut(...)
83#include "GPUSettingsList.h"
84#undef BeginNamespace
85#undef EndNamespace
86#undef AddOption
87#undef AddOptionRTC
88#undef AddVariable
89#undef AddVariableRTC
90#undef AddOptionSet
91#undef AddOptionVec
92#undef AddOptionArray
93#undef AddOptionArrayRTC
94#undef AddSubConfig
95#undef BeginSubConfig
96#undef BeginHiddenConfig
97#undef EndConfig
98#undef AddCustomCPP
99#undef AddHelp
100#undef AddShortcut
101
102 obj.configProcessing = proc;
104 obj.configDisplay = display;
105 obj.configQA = QA;
107 if (global.setMaxTimeBin != -2) {
108 obj.configGRP.grpContinuousMaxTimeBin = global.setMaxTimeBin;
109 } else {
110 obj.configGRP.grpContinuousMaxTimeBin = global.tpcTriggeredMode ? 0 : -1;
111 }
112 }
113 if (global.solenoidBzNominalGPU > -1e6f) {
114 obj.configGRP.solenoidBzNominalGPU = global.solenoidBzNominalGPU;
115 }
116 if (global.constBz) {
117 obj.configGRP.constBz = global.constBz;
118 }
119 if (global.gpuDisplayfilterMacro != "") {
120 obj.configDisplay.filterMacros.emplace_back(global.gpuDisplayfilterMacro);
121 }
122 if (obj.configReconstruction.tpc.trackReferenceX == 1000.f) {
123 obj.configReconstruction.tpc.trackReferenceX = 83.f;
124 }
125 obj.configDeviceBackend.deviceType = GPUDataTypes::GetDeviceType(global.deviceType.c_str());
126 obj.configDeviceBackend.forceDeviceType = global.forceDeviceType;
127 return global;
128}
129
130void GPUO2InterfaceConfiguration::PrintParam_internal()
131{
133}
static void dumpConfig(const GPUSettingsRec *rec, const GPUSettingsProcessing *proc, const GPUSettingsQA *qa, const GPUSettingsDisplay *display, const GPUSettingsDeviceBackend *device, const GPURecoStepConfiguration *workflow)
static DeviceType GetDeviceType(const char *type)
GPUReconstruction * rec