Skip to content

Commit 750e5c6

Browse files
committed
Add getter for individual GPU configKeyValues
1 parent 996b7b1 commit 750e5c6

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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 GPUO2InterfaceConfiguration.inc
13+
/// \author David Rohr
14+
15+
#ifndef GPUO2INTERFACECONFIGURATIONINC_H
16+
#define GPUO2INTERFACECONFIGURATIONINC_H
17+
18+
#ifdef GPUCA_STANDALONE
19+
#define GPU_GET_CONFIG(configName) static_assert(false, "GPU_GET_CONFIG not available in standalone benchmark")
20+
#else
21+
#include "GPUDefMacros.h"
22+
#include "GPUO2InterfaceConfiguration.h"
23+
#include "GPUO2ConfigurableParam.h"
24+
#include <type_traits>
25+
26+
#define GPU_GET_CONFIG(configName) []() -> decltype(auto) { \
27+
static_assert(!std::is_same_v<o2::gpu::configName, o2::gpu::GPUSettingsProcessing>); \
28+
return GPUCA_M_CAT(GPUConfigurableParam, configName)::Instance(); \
29+
}()
30+
#endif
31+
32+
#endif

0 commit comments

Comments
 (0)