Skip to content

Commit 5849ee5

Browse files
committed
GPU: Remove all ROOT5 / CINT based protections
1 parent c5bd651 commit 5849ee5

File tree

15 files changed

+18
-53
lines changed

15 files changed

+18
-53
lines changed

GPU/Common/GPUCommonDef.h

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,11 @@
3030
//Some GPU configuration settings, must be included first
3131
#include "GPUCommonDefSettings.h"
3232

33-
#if (!(defined(__CINT__) || defined(__ROOTCINT__)) || defined(__CLING__)) && defined(__cplusplus) && __cplusplus >= 201103L
33+
#if defined(__cplusplus) && __cplusplus >= 201103L
3434
#define GPUCA_NOCOMPAT // C++11 + No old ROOT5 + No old OpenCL
35-
#ifndef __CINT__
36-
#define GPUCA_NOCOMPAT_ALLCINT // + No ROOT CINT at all
37-
#endif
3835
#endif
3936

40-
#if !(defined(__CINT__) || defined(__ROOTCINT__) || defined(__CLING__) || defined(__ROOTCLING__) || defined(G__ROOT)) // No GPU code for ROOT
37+
#if !(defined(__CLING__) || defined(__ROOTCLING__) || defined(G__ROOT)) // No GPU code for ROOT
4138
#if defined(__CUDACC__) || defined(__OPENCL__) || defined(__HIPCC__) || defined(__OPENCL_HOST__)
4239
#define GPUCA_GPUCODE // Compiled by GPU compiler
4340
#endif
@@ -47,7 +44,7 @@
4744
#endif
4845
#endif
4946

50-
// Definitions for C++11 features not supported by CINT / OpenCL
47+
// Definitions for C++11 features
5148
#ifdef GPUCA_NOCOMPAT
5249
#define CON_DELETE = delete
5350
#define CON_DEFAULT = default
@@ -63,11 +60,6 @@
6360
#define CONSTEXPR
6461
#define GPUCA_CPP11_INIT(...)
6562
#endif
66-
#if defined(__ROOT__) && !defined(GPUCA_NOCOMPAT)
67-
#define VOLATILE // ROOT5 has a problem with volatile in CINT
68-
#else
69-
#define VOLATILE volatile
70-
#endif
7163

7264
// Set AliRoot / O2 namespace
7365
#if defined(GPUCA_STANDALONE) || (defined(GPUCA_O2_LIB) && !defined(GPUCA_O2_INTERFACE)) || defined(GPUCA_ALIROOT_LIB) || defined (GPUCA_GPUCODE)

GPU/Common/GPUCommonMath.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ GPUdi() void GPUCommonMath::AtomicMinInternal(S* addr, T val)
531531
#endif // GPUCA_GPUCODE
532532
}
533533

534-
#if (defined(__CUDACC__) || defined(__HIPCC__)) && !defined(__ROOTCINT__) && !defined(G__ROOT)
534+
#if (defined(__CUDACC__) || defined(__HIPCC__)) && !defined(G__ROOT)
535535
#define GPUCA_HAVE_ATOMIC_MINMAX_FLOAT
536536
template <>
537537
GPUdii() void GPUCommonMath::AtomicMaxInternal(GPUglobalref() GPUgeneric() GPUAtomic(float) * addr, float val)

GPU/GPUTracking/Base/GPUConstantMem.h

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,8 @@
2020
#include "GPUDataTypes.h"
2121
#include "GPUErrors.h"
2222

23-
// Dummies for stuff not supported in legacy code (ROOT 5)
24-
#if defined(GPUCA_NOCOMPAT_ALLCINT)
2523
#include "GPUTPCGMMerger.h"
26-
#else
27-
namespace GPUCA_NAMESPACE
28-
{
29-
namespace gpu
30-
{
31-
class GPUTPCGMMerger
32-
{
33-
};
34-
} // namespace gpu
35-
} // namespace GPUCA_NAMESPACE
36-
#endif
37-
#if defined(GPUCA_NOCOMPAT_ALLCINT) && (!defined(GPUCA_GPUCODE) || !defined(GPUCA_ALIROOT_LIB))
24+
#if (!defined(GPUCA_GPUCODE) || !defined(GPUCA_ALIROOT_LIB))
3825
#include "GPUTRDTracker.h"
3926
#else
4027
#include "GPUTRDDef.h"
@@ -52,7 +39,7 @@ class GPUTRDTracker_t
5239
#endif
5340

5441
// Dummies for stuff not suppored in legacy code, or for what requires O2 headers while not available
55-
#if defined(GPUCA_NOCOMPAT_ALLCINT) && (!defined(GPUCA_GPUCODE) || !defined(GPUCA_ALIROOT_LIB)) && defined(GPUCA_HAVE_O2HEADERS)
42+
#if (!defined(GPUCA_GPUCODE) || !defined(GPUCA_ALIROOT_LIB)) && defined(GPUCA_HAVE_O2HEADERS)
5643
#include "GPUTPCConvert.h"
5744
#include "GPUTPCCompression.h"
5845
#include "GPUTPCDecompression.h"

GPU/GPUTracking/Base/GPUParam.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ struct GPUParam_t {
7878
};
7979
} // namespace internal
8080

81-
#if !(defined(__CINT__) || defined(__ROOTCINT__)) || defined(__CLING__) // Hide from ROOT 5 CINT
8281
struct GPUParam : public internal::GPUParam_t<GPUSettingsRec, GPUSettingsParam> {
8382

8483
#ifndef GPUCA_GPUCODE
@@ -115,7 +114,6 @@ struct GPUParam : public internal::GPUParam_t<GPUSettingsRec, GPUSettingsParam>
115114

116115
GPUd() bool rejectEdgeClusterByY(float uncorrectedY, int32_t iRow, float trackSigmaY) const;
117116
};
118-
#endif
119117

120118
} // namespace gpu
121119
} // namespace GPUCA_NAMESPACE

GPU/GPUTracking/Base/GPUReconstructionDeviceBase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace GPUCA_NAMESPACE
2525
{
2626
namespace gpu
2727
{
28-
#if !(defined(__CINT__) || defined(__ROOTCINT__) || defined(__CLING__) || defined(__ROOTCLING__) || defined(G__ROOT))
28+
#if !(defined(__CLING__) || defined(__ROOTCLING__) || defined(G__ROOT))
2929
extern template class GPUReconstructionKernels<GPUReconstructionCPUBackend>;
3030
#endif
3131

GPU/GPUTracking/DataTypes/GPUTRDTrack.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,6 @@ class GlobalTrackID;
3636
} // namespace o2
3737

3838
//_____________________________________________________________________________
39-
#if (defined(__CINT__) || defined(__ROOTCINT__)) && !defined(__CLING__)
40-
namespace GPUCA_NAMESPACE
41-
{
42-
namespace gpu
43-
{
44-
template <typename T>
45-
class GPUTRDTrack_t;
46-
} // namespace gpu
47-
} // namespace GPUCA_NAMESPACE
48-
#else
4939
#if (!defined(GPUCA_STANDALONE) && !defined(GPUCA_ALIROOT_LIB)) || defined(GPUCA_HAVE_O2HEADERS)
5040
#include "GPUTRDInterfaceO2Track.h"
5141
#endif
@@ -150,6 +140,4 @@ class GPUTRDTrack_t : public T
150140
} // namespace gpu
151141
} // namespace GPUCA_NAMESPACE
152142

153-
#endif // !((defined(__CINT__) || defined(__ROOTCINT__)) && !defined(__CLING__))
154-
155143
#endif // GPUTRDTRACK_H

GPU/GPUTracking/Definitions/GPULogging.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include "GPUCommonDef.h"
1919
// clang-format off
2020
#if !defined(GPUCA_NOCOMPAT)
21-
// Cannot do anything for ROOT5CINT, so just disable
21+
// just disable
2222
#define GPUInfo(...)
2323
#define GPUImportant(...)
2424
#define GPUWarning(...)

GPU/GPUTracking/GPUTrackingLinkDef_AliRoot.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
/// \file GPUTrackingLinkDef_AliRoot.h
1313
/// \author David Rohr
1414

15-
#if defined(__CINT__) || defined(__CLING__)
15+
#if defined(__CLING__)
1616

1717
#pragma link off all globals;
1818
#pragma link off all classes;

GPU/GPUTracking/Global/GPUChainTracking.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ class GPUChainTracking : public GPUChain, GPUReconstructionHelpers::helperDelega
293293

294294
// Synchronization and Locks
295295
eventStruct* mEvents = nullptr;
296-
VOLATILE int32_t mSliceSelectorReady = 0;
296+
volatile int32_t mSliceSelectorReady = 0;
297297
std::array<int8_t, NSLICES> mWriteOutputDone;
298298

299299
std::vector<outputQueueEntry> mOutputQueue;

GPU/TPCFastTransformation/Spline2D.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include "FlatObject.h"
2323
#include "GPUCommonDef.h"
2424

25-
#if !defined(__CINT__) && !defined(__ROOTCINT__) && !defined(__ROOTCLING__) && !defined(GPUCA_GPUCODE) && !defined(GPUCA_NO_VC) && defined(__cplusplus) && __cplusplus >= 201703L
25+
#if !defined(__ROOTCLING__) && !defined(GPUCA_GPUCODE) && !defined(GPUCA_NO_VC) && defined(__cplusplus) && __cplusplus >= 201703L
2626
#include <Vc/Vc>
2727
#include <Vc/SimdArray>
2828
#endif

0 commit comments

Comments
 (0)