Project
Loading...
Searching...
No Matches
GPUO2ConfigurableParam.h
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// This file auto-generates a ConfigurableParam object from the GPU parameter macros.
16// Set via:
17// --configKeyValues "GPU_global.[x]=[y]" : for global GPU run configurations, like solenoidBz, gpuType, configuration object files.
18// --configKeyValues "GPU_rec.[x]=[y]" : for GPU reconstruction related settings used on the GPU, like pt threshold for track rejection.
19// --configKeyValues "GPU_proc.[x]=[y]" : for processing options steering GPU reconstruction like GPU device ID, debug output level, number of CPU threads.
20// Check GPUSettingsList.h for all options
21
22#ifndef GPUO2CONFIGURABLEPARAM_H
23#define GPUO2CONFIGURABLEPARAM_H
24
25#include "GPUO2ExternalUser.h"
28#define GPUSETTINGS_DISPLAY
29#include "GPUSettings.h"
30#include "GPUDefMacros.h"
31#include <vector>
32
33// clang-format off
34#define BeginNamespace(name) \
35 namespace name \
36 {
37#define EndNamespace() }
38#define AddOption(name, type, default, optname, optnameshort, help, ...) type name = default;
39#define AddOptionRTC(...) AddOption(__VA_ARGS__)
40#define AddVariable(name, type, default)
41#define AddVariableRTC(...) AddVariable(__VA_ARGS__)
42#define AddOptionSet(name, type, value, optname, optnameshort, help, ...)
43#define AddOptionVec(name, type, optname, optnameshort, help, ...)
44#define AddOptionArray(name, type, count, default, optname, optnameshort, help, ...) type name[count] = {GPUCA_M_STRIP(default)};
45#define AddSubConfig(name, instance)
46#define BeginSubConfig(name, instance, parent, preoptname, preoptnameshort, descr, o2prefix) \
47 namespace internal \
48 { \
49 struct GPUCA_M_CAT(GPUConfigurableParam, name) : public o2::conf::ConfigurableParamHelper<GPUCA_M_CAT(GPUConfigurableParam, name)> { \
50 O2ParamDef(GPUCA_M_CAT(GPUConfigurableParam, name), GPUCA_M_STR(GPUCA_M_CAT(GPU_, o2prefix))) public:
51#define BeginHiddenConfig(name, instance) \
52 namespace internal \
53 { \
54 struct GPUCA_M_CAT(GPUConfigurableParam, name) {
55#define EndConfig() \
56 }; \
57 } // namespace internal
58#define AddCustomCPP(...) __VA_ARGS__
59#define AddHelp(...)
60#define AddShortcut(...)
61#define AddOptionRTC(...) AddOption(__VA_ARGS__)
62#define AddOptionArrayRTC(...) AddOptionArray(__VA_ARGS__)
64#include "GPUSettingsList.h"
65#undef BeginNamespace
66#undef EndNamespace
67#undef AddOption
68#undef AddOptionRTC
69#undef AddVariable
70#undef AddVariableRTC
71#undef AddOptionSet
72#undef AddOptionVec
73#undef AddOptionArray
74#undef AddOptionArrayRTC
75#undef AddSubConfig
76#undef BeginSubConfig
77#undef BeginHiddenConfig
78#undef EndConfig
79#undef AddCustomCPP
80#undef AddHelp
81#undef AddShortcut
82// clang-format on
83
84#endif