Project
Loading...
Searching...
No Matches
GPUO2InterfaceConfigurableParam.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 GPUO2INTERFACECONFIGURABLEPARAM_H
23#define GPUO2INTERFACECONFIGURABLEPARAM_H
24
25// Some defines denoting that we are compiling for O2
26#ifndef GPUCA_TPC_GEOMETRY_O2
27#define GPUCA_TPC_GEOMETRY_O2
28#endif
29#ifndef GPUCA_O2_INTERFACE
30#define GPUCA_O2_INTERFACE
31#endif
32
35#include "GPUSettings.h"
36#include "GPUDefMacros.h"
37#include <vector>
38
39#define BeginNamespace(name) \
40 namespace name \
41 {
42#define EndNamespace() }
43#define AddOption(name, type, default, optname, optnameshort, help, ...) type name = default;
44#define AddOptionRTC(...) AddOption(__VA_ARGS__)
45#define AddVariable(name, type, default)
46#define AddVariableRTC(...) AddVariable(__VA_ARGS__)
47#define AddOptionSet(name, type, value, optname, optnameshort, help, ...)
48#define AddOptionVec(name, type, optname, optnameshort, help, ...)
49#define AddOptionArray(name, type, count, default, optname, optnameshort, help, ...) type name[count] = {GPUCA_M_STRIP(default)};
50#define AddSubConfig(name, instance)
51#define BeginSubConfig(name, instance, parent, preoptname, preoptnameshort, descr, o2prefix) \
52 struct GPUCA_M_CAT(GPUConfigurableParam, name) : public o2::conf::ConfigurableParamHelper<GPUCA_M_CAT(GPUConfigurableParam, name)> { \
53 O2ParamDef(GPUCA_M_CAT(GPUConfigurableParam, name), GPUCA_M_STR(GPUCA_M_CAT(GPU_, o2prefix))) public:
54#define BeginHiddenConfig(name, instance) struct GPUCA_M_CAT(GPUConfigurableParam, name) {
55#define EndConfig() \
56 } \
57 ;
58#define AddCustomCPP(...) __VA_ARGS__
59#define AddHelp(...)
60#define AddShortcut(...)
61#define AddOptionRTC(...) AddOption(__VA_ARGS__)
62#define AddOptionArrayRTC(...) AddOptionArray(__VA_ARGS__)
63#include "GPUSettingsList.h"
64#undef BeginNamespace
65#undef EndNamespace
66#undef AddOption
67#undef AddOptionRTC
68#undef AddVariable
69#undef AddVariableRTC
70#undef AddOptionSet
71#undef AddOptionVec
72#undef AddOptionArray
73#undef AddOptionArrayRTC
74#undef AddSubConfig
75#undef BeginSubConfig
76#undef BeginHiddenConfig
77#undef EndConfig
78#undef AddCustomCPP
79#undef AddHelp
80#undef AddShortcut
81
82#endif