Skip to content

Commit 41117c7

Browse files
committed
Please consider the following formatting changes
1 parent 2410375 commit 41117c7

File tree

5 files changed

+81
-79
lines changed

5 files changed

+81
-79
lines changed

Detectors/ITSMFT/ITS/tracking/GPU/ITStrackingGPU/TimeFrameGPU.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ class TimeFrameGPU : public TimeFrame
8585
void downloadCellsLUTDevice();
8686
void unregisterRest();
8787
template <Task task>
88-
Stream& getStream(const size_t stream) { return mGpuStreams[stream]; }
88+
Stream& getStream(const size_t stream)
89+
{
90+
return mGpuStreams[stream];
91+
}
8992
void wipe(const int);
9093

9194
/// interface

Detectors/ITSMFT/ITS/tracking/GPU/cuda/TimeFrameChunk.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ using constants::MB;
4141
namespace gpu
4242
{
4343

44-
template <int nLayers>
44+
template <int nLayers>
4545
GpuTimeFrameChunk<nLayers>::~GpuTimeFrameChunk()
4646
{
4747
if (mAllocated) {

Detectors/ITSMFT/ITS/tracking/GPU/cuda/TimeFrameGPU.cu

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,21 @@
2828
#include "GPUCommonLogger.h"
2929
#include "GPUCommonHelpers.h"
3030

31-
3231
#ifdef ITS_MEASURE_GPU_TIME
33-
#define START_GPU_STREAM_TIMER(stream, name) \
34-
cudaEvent_t event_start, event_stop; \
32+
#define START_GPU_STREAM_TIMER(stream, name) \
33+
cudaEvent_t event_start, event_stop; \
3534
GPUChkErrS(cudaEventCreate(&event_start)); \
3635
GPUChkErrS(cudaEventCreate(&event_stop)); \
3736
GPUChkErrS(cudaEventRecord(event_start, stream)); \
3837
const std::string task_name = name;
3938

4039
#define STOP_GPU_STREAM_TIMER(stream) \
41-
GPUChkErrS(cudaEventRecord(event_stop, stream)); \
42-
GPUChkErrS(cudaEventSynchronize(event_stop)); \
40+
GPUChkErrS(cudaEventRecord(event_stop, stream)); \
41+
GPUChkErrS(cudaEventSynchronize(event_stop)); \
4342
float ms; \
44-
GPUChkErrS(cudaEventElapsedTime(&ms, event_start, event_stop)); \
43+
GPUChkErrS(cudaEventElapsedTime(&ms, event_start, event_stop)); \
4544
std::cout << "Elapsed time for " << task_name << ": " << ms << " ms" << std::endl; \
46-
GPUChkErrS(cudaEventDestroy(event_start)); \
45+
GPUChkErrS(cudaEventDestroy(event_start)); \
4746
GPUChkErrS(cudaEventDestroy(event_stop));
4847
#else
4948
#define START_GPU_STREAM_TIMER(stream, name)

Detectors/ITSMFT/ITS/tracking/GPU/cuda/TrackingKernels.cu

Lines changed: 68 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -863,18 +863,18 @@ void countTrackletsInROFsHandler(const IndexTableUtils* utils,
863863
void* d_temp_storage = nullptr;
864864
size_t temp_storage_bytes = 0;
865865
GPUChkErrS(cub::DeviceScan::ExclusiveSum(d_temp_storage, // d_temp_storage
866-
temp_storage_bytes, // temp_storage_bytes
867-
trackletsLUTsHost[iLayer], // d_in
868-
trackletsLUTsHost[iLayer], // d_out
869-
nClusters[iLayer] + 1, // num_items
870-
0)); // NOLINT: this is the offset of the sum, not a pointer
866+
temp_storage_bytes, // temp_storage_bytes
867+
trackletsLUTsHost[iLayer], // d_in
868+
trackletsLUTsHost[iLayer], // d_out
869+
nClusters[iLayer] + 1, // num_items
870+
0)); // NOLINT: this is the offset of the sum, not a pointer
871871
GPUChkErrS(cudaMalloc(&d_temp_storage, temp_storage_bytes));
872872
GPUChkErrS(cub::DeviceScan::ExclusiveSum(d_temp_storage, // d_temp_storage
873-
temp_storage_bytes, // temp_storage_bytes
874-
trackletsLUTsHost[iLayer], // d_in
875-
trackletsLUTsHost[iLayer], // d_out
876-
nClusters[iLayer] + 1, // num_items
877-
0)); // NOLINT: this is the offset of the sum, not a pointer
873+
temp_storage_bytes, // temp_storage_bytes
874+
trackletsLUTsHost[iLayer], // d_in
875+
trackletsLUTsHost[iLayer], // d_out
876+
nClusters[iLayer] + 1, // num_items
877+
0)); // NOLINT: this is the offset of the sum, not a pointer
878878
GPUChkErrS(cudaFree(d_temp_storage));
879879
}
880880
}
@@ -949,18 +949,18 @@ void computeTrackletsInROFsHandler(const IndexTableUtils* utils,
949949
void* d_temp_storage = nullptr;
950950
size_t temp_storage_bytes = 0;
951951
GPUChkErrS(cub::DeviceScan::ExclusiveSum(d_temp_storage, // d_temp_storage
952-
temp_storage_bytes, // temp_storage_bytes
953-
trackletsLUTsHost[iLayer], // d_in
954-
trackletsLUTsHost[iLayer], // d_out
955-
nClusters[iLayer] + 1, // num_items
956-
0)); // NOLINT: this is the offset of the sum, not a pointer
952+
temp_storage_bytes, // temp_storage_bytes
953+
trackletsLUTsHost[iLayer], // d_in
954+
trackletsLUTsHost[iLayer], // d_out
955+
nClusters[iLayer] + 1, // num_items
956+
0)); // NOLINT: this is the offset of the sum, not a pointer
957957
GPUChkErrS(cudaMalloc(&d_temp_storage, temp_storage_bytes));
958958
GPUChkErrS(cub::DeviceScan::ExclusiveSum(d_temp_storage, // d_temp_storage
959-
temp_storage_bytes, // temp_storage_bytes
960-
trackletsLUTsHost[iLayer], // d_in
961-
trackletsLUTsHost[iLayer], // d_out
962-
nClusters[iLayer] + 1, // num_items
963-
0)); // NOLINT: this is the offset of the sum, not a pointer
959+
temp_storage_bytes, // temp_storage_bytes
960+
trackletsLUTsHost[iLayer], // d_in
961+
trackletsLUTsHost[iLayer], // d_out
962+
nClusters[iLayer] + 1, // num_items
963+
0)); // NOLINT: this is the offset of the sum, not a pointer
964964
GPUChkErrS(cudaFree(d_temp_storage));
965965
}
966966
}
@@ -1001,18 +1001,18 @@ void countCellsHandler(
10011001
void* d_temp_storage = nullptr;
10021002
size_t temp_storage_bytes = 0;
10031003
GPUChkErrS(cub::DeviceScan::ExclusiveSum(d_temp_storage, // d_temp_storage
1004-
temp_storage_bytes, // temp_storage_bytes
1005-
cellsLUTsHost, // d_in
1006-
cellsLUTsHost, // d_out
1007-
nTracklets + 1, // num_items
1008-
0)); // NOLINT: this is the offset of the sum, not a pointer
1004+
temp_storage_bytes, // temp_storage_bytes
1005+
cellsLUTsHost, // d_in
1006+
cellsLUTsHost, // d_out
1007+
nTracklets + 1, // num_items
1008+
0)); // NOLINT: this is the offset of the sum, not a pointer
10091009
GPUChkErrS(cudaMalloc(&d_temp_storage, temp_storage_bytes));
10101010
GPUChkErrS(cub::DeviceScan::ExclusiveSum(d_temp_storage, // d_temp_storage
1011-
temp_storage_bytes, // temp_storage_bytes
1012-
cellsLUTsHost, // d_in
1013-
cellsLUTsHost, // d_out
1014-
nTracklets + 1, // num_items
1015-
0)); // NOLINT: this is the offset of the sum, not a pointer
1011+
temp_storage_bytes, // temp_storage_bytes
1012+
cellsLUTsHost, // d_in
1013+
cellsLUTsHost, // d_out
1014+
nTracklets + 1, // num_items
1015+
0)); // NOLINT: this is the offset of the sum, not a pointer
10161016
GPUChkErrS(cudaFree(d_temp_storage));
10171017
}
10181018

@@ -1079,32 +1079,32 @@ unsigned int countCellNeighboursHandler(CellSeed** cellsLayersDevice,
10791079
void *d_temp_storage = nullptr, *d_temp_storage_2 = nullptr;
10801080
size_t temp_storage_bytes = 0, temp_storage_bytes_2 = 0;
10811081
GPUChkErrS(cub::DeviceScan::InclusiveSum(d_temp_storage, // d_temp_storage
1082-
temp_storage_bytes, // temp_storage_bytes
1083-
neighboursLUT, // d_in
1084-
neighboursLUT, // d_out
1085-
nCellsNext)); // num_items
1082+
temp_storage_bytes, // temp_storage_bytes
1083+
neighboursLUT, // d_in
1084+
neighboursLUT, // d_out
1085+
nCellsNext)); // num_items
10861086

10871087
GPUChkErrS(cudaMalloc(&d_temp_storage, temp_storage_bytes));
10881088
GPUChkErrS(cub::DeviceScan::InclusiveSum(d_temp_storage, // d_temp_storage
1089-
temp_storage_bytes, // temp_storage_bytes
1090-
neighboursLUT, // d_in
1091-
neighboursLUT, // d_out
1092-
nCellsNext)); // num_items
1089+
temp_storage_bytes, // temp_storage_bytes
1090+
neighboursLUT, // d_in
1091+
neighboursLUT, // d_out
1092+
nCellsNext)); // num_items
10931093

10941094
GPUChkErrS(cub::DeviceScan::ExclusiveSum(d_temp_storage_2, // d_temp_storage
1095-
temp_storage_bytes_2, // temp_storage_bytes
1096-
neighboursIndexTable, // d_in
1097-
neighboursIndexTable, // d_out
1098-
nCells + 1, // num_items
1099-
0)); // NOLINT: this is the offset of the sum, not a pointer
1095+
temp_storage_bytes_2, // temp_storage_bytes
1096+
neighboursIndexTable, // d_in
1097+
neighboursIndexTable, // d_out
1098+
nCells + 1, // num_items
1099+
0)); // NOLINT: this is the offset of the sum, not a pointer
11001100

11011101
GPUChkErrS(cudaMalloc(&d_temp_storage_2, temp_storage_bytes_2));
11021102
GPUChkErrS(cub::DeviceScan::ExclusiveSum(d_temp_storage_2, // d_temp_storage
1103-
temp_storage_bytes_2, // temp_storage_bytes
1104-
neighboursIndexTable, // d_in
1105-
neighboursIndexTable, // d_out
1106-
nCells + 1, // num_items
1107-
0)); // NOLINT: this is the offset of the sum, not a pointer
1103+
temp_storage_bytes_2, // temp_storage_bytes
1104+
neighboursIndexTable, // d_in
1105+
neighboursIndexTable, // d_out
1106+
nCells + 1, // num_items
1107+
0)); // NOLINT: this is the offset of the sum, not a pointer
11081108
unsigned int nNeighbours;
11091109
GPUChkErrS(cudaMemcpy(&nNeighbours, &neighboursLUT[nCellsNext - 1], sizeof(unsigned int), cudaMemcpyDeviceToHost));
11101110
GPUChkErrS(cudaFree(d_temp_storage));
@@ -1215,18 +1215,18 @@ void processNeighboursHandler(const int startLayer,
12151215
void* d_temp_storage = nullptr;
12161216
size_t temp_storage_bytes = 0;
12171217
GPUChkErrS(cub::DeviceScan::ExclusiveSum(nullptr, // d_temp_storage
1218-
temp_storage_bytes, // temp_storage_bytes
1219-
thrust::raw_pointer_cast(&foundSeedsTable[0]), // d_in
1220-
thrust::raw_pointer_cast(&foundSeedsTable[0]), // d_out
1221-
nCells[startLayer] + 1, // num_items
1222-
0)); // NOLINT: this is the offset of the sum, not a pointer
1218+
temp_storage_bytes, // temp_storage_bytes
1219+
thrust::raw_pointer_cast(&foundSeedsTable[0]), // d_in
1220+
thrust::raw_pointer_cast(&foundSeedsTable[0]), // d_out
1221+
nCells[startLayer] + 1, // num_items
1222+
0)); // NOLINT: this is the offset of the sum, not a pointer
12231223
GPUChkErrS(cudaMalloc(&d_temp_storage, temp_storage_bytes));
12241224
GPUChkErrS(cub::DeviceScan::ExclusiveSum(d_temp_storage, // d_temp_storage
1225-
temp_storage_bytes, // temp_storage_bytes
1226-
thrust::raw_pointer_cast(&foundSeedsTable[0]), // d_in
1227-
thrust::raw_pointer_cast(&foundSeedsTable[0]), // d_out
1228-
nCells[startLayer] + 1, // num_items
1229-
0)); // NOLINT: this is the offset of the sum, not a pointer
1225+
temp_storage_bytes, // temp_storage_bytes
1226+
thrust::raw_pointer_cast(&foundSeedsTable[0]), // d_in
1227+
thrust::raw_pointer_cast(&foundSeedsTable[0]), // d_out
1228+
nCells[startLayer] + 1, // num_items
1229+
0)); // NOLINT: this is the offset of the sum, not a pointer
12301230
12311231
updatedCellId.resize(foundSeedsTable.back());
12321232
updatedCellSeed.resize(foundSeedsTable.back());
@@ -1279,18 +1279,18 @@ void processNeighboursHandler(const int startLayer,
12791279
propagator,
12801280
matCorrType);
12811281
GPUChkErrS(cub::DeviceScan::ExclusiveSum(nullptr, // d_temp_storage
1282-
temp_storage_bytes, // temp_storage_bytes
1283-
thrust::raw_pointer_cast(&foundSeedsTable[0]), // d_in
1284-
thrust::raw_pointer_cast(&foundSeedsTable[0]), // d_out
1285-
nCells[iLayer] + 1, // num_items
1286-
0)); // NOLINT: this is the offset of the sum, not a pointer
1282+
temp_storage_bytes, // temp_storage_bytes
1283+
thrust::raw_pointer_cast(&foundSeedsTable[0]), // d_in
1284+
thrust::raw_pointer_cast(&foundSeedsTable[0]), // d_out
1285+
nCells[iLayer] + 1, // num_items
1286+
0)); // NOLINT: this is the offset of the sum, not a pointer
12871287
GPUChkErrS(cudaMalloc(&d_temp_storage, temp_storage_bytes));
12881288
GPUChkErrS(cub::DeviceScan::ExclusiveSum(d_temp_storage, // d_temp_storage
1289-
temp_storage_bytes, // temp_storage_bytes
1290-
thrust::raw_pointer_cast(&foundSeedsTable[0]), // d_in
1291-
thrust::raw_pointer_cast(&foundSeedsTable[0]), // d_out
1292-
nCells[iLayer] + 1, // num_items
1293-
0)); // NOLINT: this is the offset of the sum, not a pointer
1289+
temp_storage_bytes, // temp_storage_bytes
1290+
thrust::raw_pointer_cast(&foundSeedsTable[0]), // d_in
1291+
thrust::raw_pointer_cast(&foundSeedsTable[0]), // d_out
1292+
nCells[iLayer] + 1, // num_items
1293+
0)); // NOLINT: this is the offset of the sum, not a pointer
12941294
auto foundSeeds{foundSeedsTable.back()};
12951295
updatedCellId.resize(foundSeeds);
12961296
thrust::fill(updatedCellId.begin(), updatedCellId.end(), 0);

Detectors/ITSMFT/ITS/tracking/include/ITStracking/Constants.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ GPUhdi() constexpr o2::gpu::gpustd::array<float, LayersNumber> InverseZBinSize()
8484
{
8585
constexpr auto zSize = LayersZCoordinate();
8686
return o2::gpu::gpustd::array<float, LayersNumber>{0.5f * ZBins / (zSize[0]), 0.5f * ZBins / (zSize[1]), 0.5f * ZBins / (zSize[2]),
87-
0.5f * ZBins / (zSize[3]), 0.5f * ZBins / (zSize[4]), 0.5f * ZBins / (zSize[5]),
88-
0.5f * ZBins / (zSize[6])};
87+
0.5f * ZBins / (zSize[3]), 0.5f * ZBins / (zSize[4]), 0.5f * ZBins / (zSize[5]),
88+
0.5f * ZBins / (zSize[6])};
8989
}
9090

9191
GPUhdi() constexpr float getInverseZCoordinate(const int layerIndex)

0 commit comments

Comments
 (0)