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#include "GPUSettings.h"
29#include "GPUDefMacros.h"
30#include <vector>
31
32#define BeginNamespace(name) \
33 namespace name \
34 {
35#define EndNamespace() }
36#define AddOption(name, type, default, optname, optnameshort, help, ...) type name = default;
37#define AddOptionRTC(...) AddOption(__VA_ARGS__)
38#define AddVariable(name, type, default)
39#define AddVariableRTC(...) AddVariable(__VA_ARGS__)
40#define AddOptionSet(name, type, value, optname, optnameshort, help, ...)
41#define AddOptionVec(name, type, optname, optnameshort, help, ...)
42#define AddOptionArray(name, type, count, default, optname, optnameshort, help, ...) type name[count] = {GPUCA_M_STRIP(default)};
43#define AddSubConfig(name, instance)
44#define BeginSubConfig(name, instance, parent, preoptname, preoptnameshort, descr, o2prefix) \
45 struct GPUCA_M_CAT(GPUConfigurableParam, name) : public o2::conf::ConfigurableParamHelper<GPUCA_M_CAT(GPUConfigurableParam, name)> { \
46 O2ParamDef(GPUCA_M_CAT(GPUConfigurableParam, name), GPUCA_M_STR(GPUCA_M_CAT(GPU_, o2prefix))) public:
47#define BeginHiddenConfig(name, instance) struct GPUCA_M_CAT(GPUConfigurableParam, name) {
48#define EndConfig() \
49 } \
50 ;
51#define AddCustomCPP(...) __VA_ARGS__
52#define AddHelp(...)
53#define AddShortcut(...)
54#define AddOptionRTC(...) AddOption(__VA_ARGS__)
55#define AddOptionArrayRTC(...) AddOptionArray(__VA_ARGS__)
56#include "GPUSettingsList.h"
57#undef BeginNamespace
58#undef EndNamespace
59#undef AddOption
60#undef AddOptionRTC
61#undef AddVariable
62#undef AddVariableRTC
63#undef AddOptionSet
64#undef AddOptionVec
65#undef AddOptionArray
66#undef AddOptionArrayRTC
67#undef AddSubConfig
68#undef BeginSubConfig
69#undef BeginHiddenConfig
70#undef EndConfig
71#undef AddCustomCPP
72#undef AddHelp
73#undef AddShortcut
74
75#endif