Skip to content

Commit 79e18c1

Browse files
mpucciosawenzel
authored andcommitted
NFC: Fix codechecker for the ITS GPU code
1 parent acd9e5d commit 79e18c1

Some content is hidden

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

46 files changed

+262
-262
lines changed

Detectors/ITSMFT/ITS/tracking/cuda/include/ITStrackingCUDA/Array.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace o2
2121
{
2222
namespace its
2323
{
24-
namespace GPU
24+
namespace gpu
2525
{
2626

2727
namespace
@@ -64,7 +64,7 @@ struct Array final {
6464

6565
T InternalArray[Size];
6666
};
67-
} // namespace GPU
67+
} // namespace gpu
6868
} // namespace its
6969
} // namespace o2
7070

Detectors/ITSMFT/ITS/tracking/cuda/include/ITStrackingCUDA/ClusterLinesGPU.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace o2
2222
{
2323
namespace its
2424
{
25-
namespace GPU
25+
namespace gpu
2626
{
2727

2828
struct GPUVertex final {
@@ -66,7 +66,7 @@ class ClusterLinesGPU final
6666
float mVertex[3]; // cluster centroid position
6767
};
6868

69-
} // namespace GPU
69+
} // namespace gpu
7070
} // namespace its
7171
} // namespace o2
7272
#endif

Detectors/ITSMFT/ITS/tracking/cuda/include/ITStrackingCUDA/Context.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace o2
2323
{
2424
namespace its
2525
{
26-
namespace GPU
26+
namespace gpu
2727
{
2828

2929
struct DeviceProperties final {
@@ -62,7 +62,7 @@ class Context final
6262
int mDevicesNum;
6363
std::vector<DeviceProperties> mDeviceProperties;
6464
};
65-
} // namespace GPU
65+
} // namespace gpu
6666
} // namespace its
6767
} // namespace o2
6868

Detectors/ITSMFT/ITS/tracking/cuda/include/ITStrackingCUDA/DeviceStoreNV.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ namespace o2
3030
namespace its
3131
{
3232

33-
namespace GPU
33+
namespace gpu
3434
{
3535

3636
class DeviceStoreNV final
@@ -131,7 +131,7 @@ GPU_HOST_DEVICE inline float DeviceStoreNV::getRmax(int layer)
131131
return mRmax[layer];
132132
}
133133

134-
} // namespace GPU
134+
} // namespace gpu
135135
} // namespace its
136136
} // namespace o2
137137

Detectors/ITSMFT/ITS/tracking/cuda/include/ITStrackingCUDA/DeviceStoreVertexerGPU.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace o2
3535
{
3636
namespace its
3737
{
38-
namespace GPU
38+
namespace gpu
3939
{
4040

4141
enum class TrackletingLayerOrder {
@@ -145,7 +145,7 @@ inline std::vector<int> DeviceStoreVertexerGPU::getNFoundTrackletsFromGPU(const
145145
std::vector<int> nFoundDuplets;
146146
nFoundDuplets.resize(sizes[1]);
147147

148-
if (order == GPU::Order::fromInnermostToMiddleLayer) {
148+
if (order == gpu::Order::fromInnermostToMiddleLayer) {
149149
mNFoundDuplets[0].copyIntoSizedVector(nFoundDuplets);
150150
} else {
151151
mNFoundDuplets[1].copyIntoSizedVector(nFoundDuplets);
@@ -165,7 +165,7 @@ inline std::vector<Tracklet> DeviceStoreVertexerGPU::getRawDupletsFromGPU(const
165165
std::vector<int> nFoundDuplets;
166166
nFoundDuplets.resize(sizes[1]);
167167

168-
if (order == GPU::Order::fromInnermostToMiddleLayer) {
168+
if (order == gpu::Order::fromInnermostToMiddleLayer) {
169169
mNFoundDuplets[0].copyIntoSizedVector(nFoundDuplets);
170170
mDuplets01.copyIntoSizedVector(tmpDuplets);
171171
} else {
@@ -188,7 +188,7 @@ inline std::vector<Tracklet> DeviceStoreVertexerGPU::getDupletsFromGPU(const Ord
188188
nFoundDuplets.resize(sizes[1]);
189189
std::vector<Tracklet> shrinkedDuplets;
190190

191-
if (order == GPU::Order::fromInnermostToMiddleLayer) {
191+
if (order == gpu::Order::fromInnermostToMiddleLayer) {
192192
mNFoundDuplets[0].copyIntoSizedVector(nFoundDuplets);
193193
mDuplets01.copyIntoSizedVector(tmpDuplets);
194194
} else {
@@ -244,7 +244,7 @@ inline std::vector<int> DeviceStoreVertexerGPU::getHistogramZFromGPU()
244244

245245
inline void DeviceStoreVertexerGPU::updateDuplets(const Order order, std::vector<Tracklet>& duplets)
246246
{
247-
if (order == GPU::Order::fromInnermostToMiddleLayer) {
247+
if (order == gpu::Order::fromInnermostToMiddleLayer) {
248248
mDuplets01.reset(duplets.data(), static_cast<int>(duplets.size()));
249249
} else {
250250
mDuplets12.reset(duplets.data(), static_cast<int>(duplets.size()));
@@ -253,7 +253,7 @@ inline void DeviceStoreVertexerGPU::updateDuplets(const Order order, std::vector
253253

254254
inline void DeviceStoreVertexerGPU::updateFoundDuplets(const Order order, std::vector<int>& nDuplets)
255255
{
256-
if (order == GPU::Order::fromInnermostToMiddleLayer) {
256+
if (order == gpu::Order::fromInnermostToMiddleLayer) {
257257
mNFoundDuplets[0].reset(nDuplets.data(), static_cast<int>(nDuplets.size()));
258258
} else {
259259
mNFoundDuplets[1].reset(nDuplets.data(), static_cast<int>(nDuplets.size()));
@@ -296,7 +296,7 @@ inline std::vector<Line> DeviceStoreVertexerGPU::getLinesFromGPU()
296296
return lines;
297297
}
298298

299-
} // namespace GPU
299+
} // namespace gpu
300300
} // namespace its
301301
} // namespace o2
302302
#endif //O2_ITS_TRACKING_DEVICE_STORE_VERTEXER_GPU_H_

Detectors/ITSMFT/ITS/tracking/cuda/include/ITStrackingCUDA/PrimaryVertexContextNV.h

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -41,87 +41,87 @@ class PrimaryVertexContextNV final : public PrimaryVertexContext
4141
void initialise(const MemoryParameters& memParam, const TrackingParameters& trkParam,
4242
const std::vector<std::vector<Cluster>>& cl, const std::array<float, 3>& pv, const int iteration) override;
4343

44-
GPU::DeviceStoreNV& getDeviceContext();
45-
GPU::Array<GPU::Vector<Cluster>, constants::its2::LayersNumber>& getDeviceClusters();
46-
GPU::Array<GPU::Vector<Tracklet>, constants::its2::TrackletsPerRoad>& getDeviceTracklets();
47-
GPU::Array<GPU::Vector<int>, constants::its2::CellsPerRoad>& getDeviceTrackletsLookupTable();
48-
GPU::Array<GPU::Vector<int>, constants::its2::CellsPerRoad>& getDeviceTrackletsPerClustersTable();
49-
GPU::Array<GPU::Vector<Cell>, constants::its2::CellsPerRoad>& getDeviceCells();
50-
GPU::Array<GPU::Vector<int>, constants::its2::CellsPerRoad - 1>& getDeviceCellsLookupTable();
51-
GPU::Array<GPU::Vector<int>, constants::its2::CellsPerRoad - 1>& getDeviceCellsPerTrackletTable();
52-
std::array<GPU::Vector<int>, constants::its2::CellsPerRoad>& getTempTableArray();
53-
std::array<GPU::Vector<Tracklet>, constants::its2::CellsPerRoad>& getTempTrackletArray();
54-
std::array<GPU::Vector<Cell>, constants::its2::CellsPerRoad - 1>& getTempCellArray();
44+
gpu::DeviceStoreNV& getDeviceContext();
45+
gpu::Array<gpu::Vector<Cluster>, constants::its2::LayersNumber>& getDeviceClusters();
46+
gpu::Array<gpu::Vector<Tracklet>, constants::its2::TrackletsPerRoad>& getDeviceTracklets();
47+
gpu::Array<gpu::Vector<int>, constants::its2::CellsPerRoad>& getDeviceTrackletsLookupTable();
48+
gpu::Array<gpu::Vector<int>, constants::its2::CellsPerRoad>& getDeviceTrackletsPerClustersTable();
49+
gpu::Array<gpu::Vector<Cell>, constants::its2::CellsPerRoad>& getDeviceCells();
50+
gpu::Array<gpu::Vector<int>, constants::its2::CellsPerRoad - 1>& getDeviceCellsLookupTable();
51+
gpu::Array<gpu::Vector<int>, constants::its2::CellsPerRoad - 1>& getDeviceCellsPerTrackletTable();
52+
std::array<gpu::Vector<int>, constants::its2::CellsPerRoad>& getTempTableArray();
53+
std::array<gpu::Vector<Tracklet>, constants::its2::CellsPerRoad>& getTempTrackletArray();
54+
std::array<gpu::Vector<Cell>, constants::its2::CellsPerRoad - 1>& getTempCellArray();
5555
void updateDeviceContext();
5656

5757
private:
58-
GPU::DeviceStoreNV mGPUContext;
59-
GPU::UniquePointer<GPU::DeviceStoreNV> mGPUContextDevicePointer;
60-
std::array<GPU::Vector<int>, constants::its2::CellsPerRoad> mTempTableArray;
61-
std::array<GPU::Vector<Tracklet>, constants::its2::CellsPerRoad> mTempTrackletArray;
62-
std::array<GPU::Vector<Cell>, constants::its2::CellsPerRoad - 1> mTempCellArray;
58+
gpu::DeviceStoreNV mGPUContext;
59+
gpu::UniquePointer<gpu::DeviceStoreNV> mGPUContextDevicePointer;
60+
std::array<gpu::Vector<int>, constants::its2::CellsPerRoad> mTempTableArray;
61+
std::array<gpu::Vector<Tracklet>, constants::its2::CellsPerRoad> mTempTrackletArray;
62+
std::array<gpu::Vector<Cell>, constants::its2::CellsPerRoad - 1> mTempCellArray;
6363
};
6464

65-
inline GPU::DeviceStoreNV& PrimaryVertexContextNV::getDeviceContext()
65+
inline gpu::DeviceStoreNV& PrimaryVertexContextNV::getDeviceContext()
6666
{
6767
return *mGPUContextDevicePointer;
6868
}
6969

70-
inline GPU::Array<GPU::Vector<Cluster>, constants::its2::LayersNumber>& PrimaryVertexContextNV::getDeviceClusters()
70+
inline gpu::Array<gpu::Vector<Cluster>, constants::its2::LayersNumber>& PrimaryVertexContextNV::getDeviceClusters()
7171
{
7272
return mGPUContext.getClusters();
7373
}
7474

75-
inline GPU::Array<GPU::Vector<Tracklet>, constants::its2::TrackletsPerRoad>& PrimaryVertexContextNV::getDeviceTracklets()
75+
inline gpu::Array<gpu::Vector<Tracklet>, constants::its2::TrackletsPerRoad>& PrimaryVertexContextNV::getDeviceTracklets()
7676
{
7777
return mGPUContext.getTracklets();
7878
}
7979

80-
inline GPU::Array<GPU::Vector<int>, constants::its2::CellsPerRoad>& PrimaryVertexContextNV::getDeviceTrackletsLookupTable()
80+
inline gpu::Array<gpu::Vector<int>, constants::its2::CellsPerRoad>& PrimaryVertexContextNV::getDeviceTrackletsLookupTable()
8181
{
8282
return mGPUContext.getTrackletsLookupTable();
8383
}
8484

85-
inline GPU::Array<GPU::Vector<int>, constants::its2::CellsPerRoad>&
85+
inline gpu::Array<gpu::Vector<int>, constants::its2::CellsPerRoad>&
8686
PrimaryVertexContextNV::getDeviceTrackletsPerClustersTable()
8787
{
8888
return mGPUContext.getTrackletsPerClusterTable();
8989
}
9090

91-
inline GPU::Array<GPU::Vector<Cell>, constants::its2::CellsPerRoad>& PrimaryVertexContextNV::getDeviceCells()
91+
inline gpu::Array<gpu::Vector<Cell>, constants::its2::CellsPerRoad>& PrimaryVertexContextNV::getDeviceCells()
9292
{
9393
return mGPUContext.getCells();
9494
}
9595

96-
inline GPU::Array<GPU::Vector<int>, constants::its2::CellsPerRoad - 1>& PrimaryVertexContextNV::getDeviceCellsLookupTable()
96+
inline gpu::Array<gpu::Vector<int>, constants::its2::CellsPerRoad - 1>& PrimaryVertexContextNV::getDeviceCellsLookupTable()
9797
{
9898
return mGPUContext.getCellsLookupTable();
9999
}
100100

101-
inline GPU::Array<GPU::Vector<int>, constants::its2::CellsPerRoad - 1>&
101+
inline gpu::Array<gpu::Vector<int>, constants::its2::CellsPerRoad - 1>&
102102
PrimaryVertexContextNV::getDeviceCellsPerTrackletTable()
103103
{
104104
return mGPUContext.getCellsPerTrackletTable();
105105
}
106106

107-
inline std::array<GPU::Vector<int>, constants::its2::CellsPerRoad>& PrimaryVertexContextNV::getTempTableArray()
107+
inline std::array<gpu::Vector<int>, constants::its2::CellsPerRoad>& PrimaryVertexContextNV::getTempTableArray()
108108
{
109109
return mTempTableArray;
110110
}
111111

112-
inline std::array<GPU::Vector<Tracklet>, constants::its2::CellsPerRoad>& PrimaryVertexContextNV::getTempTrackletArray()
112+
inline std::array<gpu::Vector<Tracklet>, constants::its2::CellsPerRoad>& PrimaryVertexContextNV::getTempTrackletArray()
113113
{
114114
return mTempTrackletArray;
115115
}
116116

117-
inline std::array<GPU::Vector<Cell>, constants::its2::CellsPerRoad - 1>& PrimaryVertexContextNV::getTempCellArray()
117+
inline std::array<gpu::Vector<Cell>, constants::its2::CellsPerRoad - 1>& PrimaryVertexContextNV::getTempCellArray()
118118
{
119119
return mTempCellArray;
120120
}
121121

122122
inline void PrimaryVertexContextNV::updateDeviceContext()
123123
{
124-
mGPUContextDevicePointer = GPU::UniquePointer<GPU::DeviceStoreNV>{mGPUContext};
124+
mGPUContextDevicePointer = gpu::UniquePointer<gpu::DeviceStoreNV>{mGPUContext};
125125
}
126126

127127
inline void PrimaryVertexContextNV::initialise(const MemoryParameters& memParam, const TrackingParameters& trkParam,

Detectors/ITSMFT/ITS/tracking/cuda/include/ITStrackingCUDA/Stream.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace o2
2121
{
2222
namespace its
2323
{
24-
namespace GPU
24+
namespace gpu
2525
{
2626

2727
class Stream final
@@ -39,7 +39,7 @@ class Stream final
3939
private:
4040
GPUStream mStream;
4141
};
42-
} // namespace GPU
42+
} // namespace gpu
4343
} // namespace its
4444
} // namespace o2
4545

Detectors/ITSMFT/ITS/tracking/cuda/include/ITStrackingCUDA/UniquePointer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace o2
2121
{
2222
namespace its
2323
{
24-
namespace GPU
24+
namespace gpu
2525
{
2626

2727
namespace
@@ -145,7 +145,7 @@ GPU_HOST_DEVICE const T& UniquePointer<T>::operator*() const noexcept
145145
{
146146
return PointerTraits::getReference(mDevicePointer);
147147
}
148-
} // namespace GPU
148+
} // namespace gpu
149149
} // namespace its
150150
} // namespace o2
151151

Detectors/ITSMFT/ITS/tracking/cuda/include/ITStrackingCUDA/Utils.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace o2
2222
{
2323
namespace its
2424
{
25-
namespace GPU
25+
namespace gpu
2626
{
2727

2828
namespace Utils
@@ -58,7 +58,7 @@ GPUd() int shareToWarp(const int, const int);
5858
GPUd() int gpuAtomicAdd(int*, const int);
5959
} // namespace Device
6060
} // namespace Utils
61-
} // namespace GPU
61+
} // namespace gpu
6262
} // namespace its
6363
} // namespace o2
6464

Detectors/ITSMFT/ITS/tracking/cuda/include/ITStrackingCUDA/Vector.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace o2
2828
{
2929
namespace its
3030
{
31-
namespace GPU
31+
namespace gpu
3232
{
3333

3434
template <typename T>
@@ -324,7 +324,7 @@ GPU_HOST_DEVICE void Vector<T>::dump()
324324
printf("mArrayPointer = %p\nmDeviceSize = %p\nmCapacity = %d\nmIsWeak = %s\n",
325325
mArrayPointer, mDeviceSize, mCapacity, mIsWeak ? "true" : "false");
326326
}
327-
} // namespace GPU
327+
} // namespace gpu
328328
} // namespace its
329329
} // namespace o2
330330

0 commit comments

Comments
 (0)