Skip to content

Commit a1cae4e

Browse files
committed
GPU: Some protection so we get a compiler warning when headers are included in wrong order
1 parent 98746db commit a1cae4e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

GPU/Common/GPUCommonRtypes.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020
#if defined(GPUCA_STANDALONE) || (defined(GPUCA_O2_LIB) && !defined(GPUCA_O2_INTERFACE)) || defined(GPUCA_GPUCODE) // clang-format off
2121
#if !defined(ROOT_Rtypes) && !defined(__CLING__)
2222
#define GPUCOMMONRTYPES_H_ACTIVE
23+
struct MUST_NOT_USE_Rtypes_h {};
24+
typedef MUST_NOT_USE_Rtypes_h TClass;
2325
#define ClassDef(name,id)
2426
#define ClassDefNV(name, id)
2527
#define ClassDefOverride(name, id)
2628
#define ClassImp(name)
2729
#define templateClassImp(name)
2830
#ifndef GPUCA_GPUCODE_DEVICE
29-
// typedef uint64_t ULong64_t;
30-
// typedef uint32_t UInt_t;
3131
#include <iostream>
3232
#endif
3333
#endif

GPU/Common/GPUROOTSMatrixFwd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ template <class T, uint32_t D1, uint32_t D2>
5252
class MatRepStdGPU;
5353
} // namespace detail
5454

55-
#if !defined(GPUCA_STANDALONE) && !defined(GPUCA_GPUCODE)
55+
#if !defined(GPUCA_STANDALONE) && !defined(GPUCA_GPUCODE) && !defined(GPUCOMMONRTYPES_H_ACTIVE)
5656
template <typename T, uint32_t N>
5757
using SVector = ROOT::Math::SVector<T, N>;
5858
template <class T, uint32_t D1, uint32_t D2, class R>

0 commit comments

Comments
 (0)