Skip to content

Commit 6daf504

Browse files
committed
GPU Common: Add GPUCommonConfigurableParam to support ConfigurableParam classes in GPU code
1 parent d655658 commit 6daf504

File tree

4 files changed

+45
-6
lines changed

4 files changed

+45
-6
lines changed

Detectors/TPC/base/include/TPCBase/ParameterDetector.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818

1919
#include <array>
2020
#include "DataFormatsTPC/Defs.h"
21-
#include "CommonUtils/ConfigurableParam.h"
22-
#include "CommonUtils/ConfigurableParamHelper.h"
21+
#include "GPUCommonConfigurableParam.h"
2322

2423
namespace o2
2524
{

Detectors/TPC/base/include/TPCBase/ParameterElectronics.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@
1717
#define ALICEO2_TPC_ParameterElectronics_H_
1818

1919
#include <array>
20-
#include "CommonUtils/ConfigurableParam.h"
21-
#include "CommonUtils/ConfigurableParamHelper.h"
2220
#include "CommonConstants/LHCConstants.h"
21+
#include "GPUCommonConfigurableParam.h"
2322

2423
namespace o2::tpc
2524
{

Detectors/TPC/base/include/TPCBase/ParameterGas.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
#define ALICEO2_TPC_ParameterGas_H_
1818

1919
#include <array>
20-
#include "CommonUtils/ConfigurableParam.h"
21-
#include "CommonUtils/ConfigurableParamHelper.h"
20+
#include "GPUCommonConfigurableParam.h"
2221

2322
namespace o2
2423
{
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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+
12+
/// \file GPUCommonConfigurableParam.h
13+
/// \author David Rohr
14+
15+
#ifndef GPUCOMMONCONFIGURABLEPARAM_H
16+
#define GPUCOMMONCONFIGURABLEPARAM_H
17+
18+
#include "GPUCommonDef.h"
19+
20+
#if defined(GPUCA_STANDALONE)
21+
22+
namespace o2::conf
23+
{
24+
template <class T>
25+
struct ConfigurableParamHelper {
26+
static const T& Instance()
27+
{
28+
static T instance;
29+
return instance;
30+
}
31+
};
32+
#define O2ParamDef(...)
33+
} // namespace o2::conf
34+
35+
#else
36+
37+
#include "CommonUtils/ConfigurableParam.h"
38+
#include "CommonUtils/ConfigurableParamHelper.h"
39+
40+
#endif
41+
42+
#endif

0 commit comments

Comments
 (0)