Skip to content

Commit b8359dc

Browse files
committed
GPU: Switch to modern C++ nested namespace style
1 parent c0c0d7e commit b8359dc

File tree

98 files changed

+236
-590
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+236
-590
lines changed

GPU/GPUTracking/Base/GPUConstantMem.h

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@
3434
#include "GPUKernelDebugOutput.h"
3535
#endif
3636

37-
namespace o2
38-
{
39-
namespace gpu
37+
namespace o2::gpu
4038
{
4139
struct GPUConstantMem {
4240
GPUParam param;
@@ -90,14 +88,11 @@ union GPUConstantMemCopyable {
9088
#if defined(GPUCA_GPUCODE)
9189
static constexpr size_t gGPUConstantMemBufferSize = (sizeof(GPUConstantMem) + sizeof(uint4) - 1);
9290
#endif
93-
} // namespace gpu
94-
} // namespace o2
91+
} // namespace o2::gpu
9592
#if defined(GPUCA_HAS_GLOBAL_SYMBOL_CONSTANT_MEM) && !defined(GPUCA_GPUCODE_HOSTONLY)
9693
GPUconstant() o2::gpu::GPUConstantMemCopyable gGPUConstantMemBuffer;
9794
#endif // GPUCA_HAS_GLOBAL_SYMBOL_CONSTANT_MEM
98-
namespace o2
99-
{
100-
namespace gpu
95+
namespace o2::gpu
10196
{
10297

10398
// Must be placed here, to avoid circular header dependency
@@ -120,7 +115,6 @@ GPUdi() void GPUProcessor::raiseError(uint32_t code, uint32_t param1, uint32_t p
120115
GetConstantMem()->errorCodes.raiseError(code, param1, param2, param3);
121116
}
122117

123-
} // namespace gpu
124-
} // namespace o2
118+
} // namespace o2::gpu
125119

126120
#endif

GPU/GPUTracking/Base/GPUGeneralKernels.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@
3232
#define GPUCA_CUB cub
3333
#endif
3434

35-
namespace o2
36-
{
37-
namespace gpu
35+
namespace o2::gpu
3836
{
3937
struct GPUConstantMem;
4038

@@ -110,8 +108,7 @@ class GPUitoa : public GPUKernelTemplate
110108
GPUd() static void Thread(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread, GPUsharedref() GPUSharedMemory& smem, processorType& processors, GPUglobalref() int32_t* ptr, uint64_t size);
111109
};
112110

113-
} // namespace gpu
114-
} // namespace o2
111+
} // namespace o2::gpu
115112

116113
#undef GPUCA_CUB
117114

GPU/GPUTracking/Base/GPUKernelDebugOutput.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
#include "GPUProcessor.h"
2020
#ifdef GPUCA_KERNEL_DEBUGGER_OUTPUT
2121

22-
namespace o2
23-
{
24-
namespace gpu
22+
namespace o2::gpu
2523
{
2624

2725
class GPUKernelDebugOutput : public GPUProcessor
@@ -75,8 +73,7 @@ class GPUKernelDebugOutput : public GPUProcessor
7573
mutable int32_t* mDebugOutMemory;
7674
};
7775

78-
} // namespace gpu
79-
} // namespace o2
76+
} // namespace o2::gpu
8077

8178
#endif
8279
#endif

GPU/GPUTracking/Base/GPUMemoryResource.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818
#include "GPUCommonDef.h"
1919
#include "GPUProcessor.h"
2020

21-
namespace o2
22-
{
23-
namespace gpu
21+
namespace o2::gpu
2422
{
2523

2624
struct GPUMemoryReuse {
@@ -103,7 +101,6 @@ class GPUMemoryResource
103101
int32_t mReuse;
104102
MemoryType mType;
105103
};
106-
} // namespace gpu
107-
} // namespace o2
104+
} // namespace o2::gpu
108105

109106
#endif

GPU/GPUTracking/Base/GPUParam.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ using Propagator = PropagatorImpl<float>;
3131
} // namespace o2::base
3232
#endif
3333

34-
namespace o2
35-
{
36-
namespace gpu
34+
namespace o2::gpu
3735
{
3836
struct GPUSettingsRec;
3937
struct GPUSettingsGTP;
@@ -114,7 +112,6 @@ struct GPUParam : public internal::GPUParam_t<GPUSettingsRec, GPUSettingsParam>
114112
GPUd() bool rejectEdgeClusterByY(float uncorrectedY, int32_t iRow, float trackSigmaY) const;
115113
};
116114

117-
} // namespace gpu
118-
} // namespace o2
115+
} // namespace o2::gpu
119116

120117
#endif

GPU/GPUTracking/Base/GPUParam.inc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
#include "GPUTPCGMMergedTrackHit.h"
2020
#include "GPUTPCClusterOccupancyMap.h"
2121

22-
namespace o2
23-
{
24-
namespace gpu
22+
namespace o2::gpu
2523
{
2624

2725
GPUdi() void GPUParam::Sector2Global(int32_t iSector, float x, float y, float z, float* X, float* Y, float* Z) const
@@ -223,7 +221,6 @@ GPUdi() bool GPUParam::rejectEdgeClusterByY(float uncorrectedY, int32_t iRow, fl
223221
return CAMath::Abs(uncorrectedY) > (tpcGeometry.NPads(iRow) - 1) * 0.5f * tpcGeometry.PadWidth(iRow) + rec.tpc.rejectEdgeClustersMargin + trackSigmaY * rec.tpc.rejectEdgeClustersSigmaMargin;
224222
}
225223

226-
} // namespace gpu
227-
} // namespace o2
224+
} // namespace o2::gpu
228225

229226
#endif

GPU/GPUTracking/Base/GPUParamRTC.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818
#include "GPUParam.h"
1919
#include <string>
2020

21-
namespace o2
22-
{
23-
namespace gpu
21+
namespace o2::gpu
2422
{
2523
namespace gpu_rtc
2624
{
@@ -38,7 +36,6 @@ struct GPUParamRTC : public internal::GPUParam_t<gpu_rtc::GPUSettingsRec, gpu_rt
3836
static std::string generateRTCCode(const GPUParam& param, bool useConstexpr);
3937
};
4038

41-
} // namespace gpu
42-
} // namespace o2
39+
} // namespace o2::gpu
4340

4441
#endif

GPU/GPUTracking/Base/GPUProcessor.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@
2323
#include <algorithm>
2424
#endif
2525

26-
namespace o2
27-
{
28-
namespace gpu
26+
namespace o2::gpu
2927
{
3028
struct GPUTrackingInOutPointers;
3129
class GPUReconstruction;
@@ -157,7 +155,6 @@ class GPUProcessor
157155

158156
friend class GPUTPCNeighboursFinder;
159157
};
160-
} // namespace gpu
161-
} // namespace o2
158+
} // namespace o2::gpu
162159

163160
#endif

GPU/GPUTracking/Base/GPUReconstruction.cxx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,7 @@
4444

4545
#include "GPUReconstructionIncludesITS.h"
4646

47-
namespace o2
48-
{
49-
namespace gpu
47+
namespace o2::gpu
5048
{
5149
struct GPUReconstructionPipelineQueue {
5250
uint32_t op = 0; // For now, 0 = process, 1 = terminate
@@ -63,8 +61,7 @@ struct GPUReconstructionPipelineContext {
6361
std::condition_variable cond;
6462
bool terminate = false;
6563
};
66-
} // namespace gpu
67-
} // namespace o2
64+
} // namespace o2::gpu
6865

6966
using namespace o2::gpu;
7067

GPU/GPUTracking/Base/GPUReconstruction.h

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,14 @@
3434
#include "GPUTPCSectorOutput.h"
3535
#include "GPULogging.h"
3636

37-
namespace o2
38-
{
39-
namespace its
37+
namespace o2::its
4038
{
4139
class TrackerTraits;
4240
class VertexerTraits;
4341
class TimeFrame;
44-
} // namespace its
45-
} // namespace o2
42+
} // namespace o2::its
4643

47-
namespace o2
48-
{
49-
namespace gpu
44+
namespace o2::gpu
5045
{
5146
class GPUChain;
5247
struct GPUMemorySizeScalers;
@@ -483,7 +478,6 @@ inline void GPUReconstruction::SetupGPUProcessor(T* proc, bool allocate)
483478
}
484479
}
485480

486-
} // namespace gpu
487-
} // namespace o2
481+
} // namespace o2::gpu
488482

489483
#endif

0 commit comments

Comments
 (0)