Skip to content

Commit 8638aee

Browse files
committed
Please consider the following formatting changes
1 parent d3f439e commit 8638aee

File tree

2 files changed

+60
-60
lines changed

2 files changed

+60
-60
lines changed

GPU/GPUTracking/TPCClusterFinder/GPUTPCNNClusterizer.cxx

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ void* GPUTPCNNClusterizer::setIOPointers(void* mem)
6969
if (mNnClusterizerVerbosity > 2) {
7070
if (mNnClusterizerVerbosity > 3) {
7171
auto fmt = [](size_t bytes) {
72-
std::ostringstream os;
73-
double mb = bytes / (1024.0 * 1024.0);
74-
os << bytes << " bytes (" << std::fixed << std::setprecision(3) << mb << " MB)";
75-
return os.str();
72+
std::ostringstream os;
73+
double mb = bytes / (1024.0 * 1024.0);
74+
os << bytes << " bytes (" << std::fixed << std::setprecision(3) << mb << " MB)";
75+
return os.str();
7676
};
7777

7878
// Element counts (number of array entries, not bytes)
@@ -101,35 +101,35 @@ void* GPUTPCNNClusterizer::setIOPointers(void* mem)
101101

102102
LOG(info) << "(NNCLUS, GPUTPCNNClusterizer, this=" << this << ") Pointers set for clusterizer with memoryID " << mMemoryId << " deviceID " << mDeviceId << " and sector " << mISector;
103103
LOG(info) << "(NNCLUS, GPUTPCNNClusterizer, this=" << this << ") mOutputDataClass pointer: " << mOutputDataClass
104-
<< " | elements=" << elemsOutputDataClass << " (= mNnClusterizerTotalClusters)"
105-
<< " | " << fmt(szOutputDataClass);
104+
<< " | elements=" << elemsOutputDataClass << " (= mNnClusterizerTotalClusters)"
105+
<< " | " << fmt(szOutputDataClass);
106106
LOG(info) << "(NNCLUS, GPUTPCNNClusterizer, this=" << this << ") mClusterFlags pointer: " << static_cast<const void*>(mClusterFlags)
107-
<< " | elements=" << elemsClusterFlags << " (= 2 * mNnClusterizerBatchedMode)"
108-
<< " | " << fmt(szClusterFlags);
107+
<< " | elements=" << elemsClusterFlags << " (= 2 * mNnClusterizerBatchedMode)"
108+
<< " | " << fmt(szClusterFlags);
109109
LOG(info) << "(NNCLUS, GPUTPCNNClusterizer, this=" << this << ") mInputData_16 pointer: " << mInputData_16
110-
<< " | elements=" << elemsInput16 << " (= mNnClusterizerBatchedMode * mNnClusterizerElementSize)"
111-
<< " | " << fmt(szInput16);
110+
<< " | elements=" << elemsInput16 << " (= mNnClusterizerBatchedMode * mNnClusterizerElementSize)"
111+
<< " | " << fmt(szInput16);
112112
LOG(info) << "(NNCLUS, GPUTPCNNClusterizer, this=" << this << ") mModelProbabilities_16 pointer: " << mModelProbabilities_16
113-
<< " | elements=" << elemsProb16 << " (= mNnClusterizerBatchedMode * mNnClusterizerModelClassNumOutputNodes)"
114-
<< " | " << fmt(szProb16);
113+
<< " | elements=" << elemsProb16 << " (= mNnClusterizerBatchedMode * mNnClusterizerModelClassNumOutputNodes)"
114+
<< " | " << fmt(szProb16);
115115
LOG(info) << "(NNCLUS, GPUTPCNNClusterizer, this=" << this << ") mOutputDataReg1_16 pointer: " << mOutputDataReg1_16
116-
<< " | elements=" << elemsReg1_16 << " (= mNnClusterizerBatchedMode * mNnClusterizerModelReg1NumOutputNodes)"
117-
<< " | " << fmt(szReg1_16);
116+
<< " | elements=" << elemsReg1_16 << " (= mNnClusterizerBatchedMode * mNnClusterizerModelReg1NumOutputNodes)"
117+
<< " | " << fmt(szReg1_16);
118118
LOG(info) << "(NNCLUS, GPUTPCNNClusterizer, this=" << this << ") mOutputDataReg2_16 pointer: " << mOutputDataReg2_16
119-
<< " | elements=" << elemsReg2_16 << " (= mNnClusterizerBatchedMode * mNnClusterizerModelReg2NumOutputNodes)"
120-
<< " | " << fmt(szReg2_16);
119+
<< " | elements=" << elemsReg2_16 << " (= mNnClusterizerBatchedMode * mNnClusterizerModelReg2NumOutputNodes)"
120+
<< " | " << fmt(szReg2_16);
121121
LOG(info) << "(NNCLUS, GPUTPCNNClusterizer, this=" << this << ") mInputData_32 pointer: " << mInputData_32
122-
<< " | elements=" << elemsInput32 << " (= mNnClusterizerBatchedMode * mNnClusterizerElementSize)"
123-
<< " | " << fmt(szInput32);
122+
<< " | elements=" << elemsInput32 << " (= mNnClusterizerBatchedMode * mNnClusterizerElementSize)"
123+
<< " | " << fmt(szInput32);
124124
LOG(info) << "(NNCLUS, GPUTPCNNClusterizer, this=" << this << ") mModelProbabilities_32 pointer: " << mModelProbabilities_32
125-
<< " | elements=" << elemsProb32 << " (= mNnClusterizerBatchedMode * mNnClusterizerModelClassNumOutputNodes)"
126-
<< " | " << fmt(szProb32);
125+
<< " | elements=" << elemsProb32 << " (= mNnClusterizerBatchedMode * mNnClusterizerModelClassNumOutputNodes)"
126+
<< " | " << fmt(szProb32);
127127
LOG(info) << "(NNCLUS, GPUTPCNNClusterizer, this=" << this << ") mOutputDataReg1_32 pointer: " << mOutputDataReg1_32
128-
<< " | elements=" << elemsReg1_32 << " (= mNnClusterizerBatchedMode * mNnClusterizerModelReg1NumOutputNodes)"
129-
<< " | " << fmt(szReg1_32);
128+
<< " | elements=" << elemsReg1_32 << " (= mNnClusterizerBatchedMode * mNnClusterizerModelReg1NumOutputNodes)"
129+
<< " | " << fmt(szReg1_32);
130130
LOG(info) << "(NNCLUS, GPUTPCNNClusterizer, this=" << this << ") mOutputDataReg2_32 pointer: " << mOutputDataReg2_32
131-
<< " | elements=" << elemsReg2_32 << " (= mNnClusterizerBatchedMode * mNnClusterizerModelReg2NumOutputNodes)"
132-
<< " | " << fmt(szReg2_32);
131+
<< " | elements=" << elemsReg2_32 << " (= mNnClusterizerBatchedMode * mNnClusterizerModelReg2NumOutputNodes)"
132+
<< " | " << fmt(szReg2_32);
133133
}
134134
// Compute allocated bytes (difference between advanced pointer and start pointer)
135135
size_t allocatedBytes = static_cast<size_t>(reinterpret_cast<uintptr_t>(mem) - reinterpret_cast<uintptr_t>(startMem));

GPU/GPUTracking/TPCClusterFinder/GPUTPCNNClusterizerKernels.cxx

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -393,20 +393,20 @@ GPUdii() void GPUTPCNNClusterizerKernels::Thread<GPUTPCNNClusterizerKernels::pub
393393

394394
if (dtype == 0) {
395395
pc.setFull(central_charge * clustererNN.mOutputDataReg1_16[model_output_index + 4].ToFloat(),
396-
static_cast<float>(peak.pad()) + clustererNN.mOutputDataReg1_16[model_output_index].ToFloat(),
397-
notSinglePad ? clustererNN.mOutputDataReg1_16[model_output_index + 2].ToFloat() : 0.f,
398-
(clusterer.mPmemory->fragment).start + static_cast<float>(peak.time()) + clustererNN.mOutputDataReg1_16[model_output_index + 1].ToFloat(),
399-
notSingleTime ? clustererNN.mOutputDataReg1_16[model_output_index + 3].ToFloat() : 0.f,
400-
clustererNN.mClusterFlags[2 * glo_idx],
401-
clustererNN.mClusterFlags[2 * glo_idx + 1]);
396+
static_cast<float>(peak.pad()) + clustererNN.mOutputDataReg1_16[model_output_index].ToFloat(),
397+
notSinglePad ? clustererNN.mOutputDataReg1_16[model_output_index + 2].ToFloat() : 0.f,
398+
(clusterer.mPmemory->fragment).start + static_cast<float>(peak.time()) + clustererNN.mOutputDataReg1_16[model_output_index + 1].ToFloat(),
399+
notSingleTime ? clustererNN.mOutputDataReg1_16[model_output_index + 3].ToFloat() : 0.f,
400+
clustererNN.mClusterFlags[2 * glo_idx],
401+
clustererNN.mClusterFlags[2 * glo_idx + 1]);
402402
} else if (dtype == 1) {
403403
pc.setFull(central_charge * clustererNN.mOutputDataReg1_32[model_output_index + 4],
404-
static_cast<float>(peak.pad()) + clustererNN.mOutputDataReg1_32[model_output_index],
405-
notSinglePad ? clustererNN.mOutputDataReg1_32[model_output_index + 2] : 0.f,
406-
(clusterer.mPmemory->fragment).start + static_cast<float>(peak.time()) + clustererNN.mOutputDataReg1_32[model_output_index + 1],
407-
notSingleTime ? clustererNN.mOutputDataReg1_32[model_output_index + 3] : 0.f,
408-
clustererNN.mClusterFlags[2 * glo_idx],
409-
clustererNN.mClusterFlags[2 * glo_idx + 1]);
404+
static_cast<float>(peak.pad()) + clustererNN.mOutputDataReg1_32[model_output_index],
405+
notSinglePad ? clustererNN.mOutputDataReg1_32[model_output_index + 2] : 0.f,
406+
(clusterer.mPmemory->fragment).start + static_cast<float>(peak.time()) + clustererNN.mOutputDataReg1_32[model_output_index + 1],
407+
notSingleTime ? clustererNN.mOutputDataReg1_32[model_output_index + 3] : 0.f,
408+
clustererNN.mClusterFlags[2 * glo_idx],
409+
clustererNN.mClusterFlags[2 * glo_idx + 1]);
410410
}
411411

412412
tpc::ClusterNative myCluster;
@@ -501,20 +501,20 @@ GPUdii() void GPUTPCNNClusterizerKernels::Thread<GPUTPCNNClusterizerKernels::pub
501501
// Cluster 1
502502
if (dtype == 0) {
503503
pc.setFull(central_charge * clustererNN.mOutputDataReg2_16[model_output_index + 8].ToFloat(),
504-
static_cast<float>(peak.pad()) + clustererNN.mOutputDataReg2_16[model_output_index].ToFloat(),
505-
clustererNN.mOutputDataReg2_16[model_output_index + 4].ToFloat(),
506-
(clusterer.mPmemory->fragment).start + static_cast<float>(peak.time()) + clustererNN.mOutputDataReg2_16[model_output_index + 2].ToFloat(),
507-
clustererNN.mOutputDataReg2_16[model_output_index + 6].ToFloat(),
508-
clustererNN.mClusterFlags[2 * glo_idx],
509-
clustererNN.mClusterFlags[2 * glo_idx + 1]);
504+
static_cast<float>(peak.pad()) + clustererNN.mOutputDataReg2_16[model_output_index].ToFloat(),
505+
clustererNN.mOutputDataReg2_16[model_output_index + 4].ToFloat(),
506+
(clusterer.mPmemory->fragment).start + static_cast<float>(peak.time()) + clustererNN.mOutputDataReg2_16[model_output_index + 2].ToFloat(),
507+
clustererNN.mOutputDataReg2_16[model_output_index + 6].ToFloat(),
508+
clustererNN.mClusterFlags[2 * glo_idx],
509+
clustererNN.mClusterFlags[2 * glo_idx + 1]);
510510
} else if (dtype == 1) {
511511
pc.setFull(central_charge * clustererNN.mOutputDataReg2_32[model_output_index + 8],
512-
static_cast<float>(peak.pad()) + clustererNN.mOutputDataReg2_32[model_output_index],
513-
clustererNN.mOutputDataReg2_32[model_output_index + 4],
514-
(clusterer.mPmemory->fragment).start + static_cast<float>(peak.time()) + clustererNN.mOutputDataReg2_32[model_output_index + 2],
515-
clustererNN.mOutputDataReg2_32[model_output_index + 6],
516-
clustererNN.mClusterFlags[2 * glo_idx],
517-
clustererNN.mClusterFlags[2 * glo_idx + 1]);
512+
static_cast<float>(peak.pad()) + clustererNN.mOutputDataReg2_32[model_output_index],
513+
clustererNN.mOutputDataReg2_32[model_output_index + 4],
514+
(clusterer.mPmemory->fragment).start + static_cast<float>(peak.time()) + clustererNN.mOutputDataReg2_32[model_output_index + 2],
515+
clustererNN.mOutputDataReg2_32[model_output_index + 6],
516+
clustererNN.mClusterFlags[2 * glo_idx],
517+
clustererNN.mClusterFlags[2 * glo_idx + 1]);
518518
}
519519

520520
tpc::ClusterNative myCluster;
@@ -547,20 +547,20 @@ GPUdii() void GPUTPCNNClusterizerKernels::Thread<GPUTPCNNClusterizerKernels::pub
547547
// Cluster 2
548548
if (dtype == 0) {
549549
pc.setFull(central_charge * clustererNN.mOutputDataReg2_16[model_output_index + 9].ToFloat(),
550-
static_cast<float>(peak.pad()) + clustererNN.mOutputDataReg2_16[model_output_index + 1].ToFloat(),
551-
clustererNN.mOutputDataReg2_16[model_output_index + 5].ToFloat(),
552-
(clusterer.mPmemory->fragment).start + static_cast<float>(peak.time()) + clustererNN.mOutputDataReg2_16[model_output_index + 3].ToFloat(),
553-
clustererNN.mOutputDataReg2_16[model_output_index + 7].ToFloat(),
554-
clustererNN.mClusterFlags[2 * glo_idx],
555-
clustererNN.mClusterFlags[2 * glo_idx + 1]);
550+
static_cast<float>(peak.pad()) + clustererNN.mOutputDataReg2_16[model_output_index + 1].ToFloat(),
551+
clustererNN.mOutputDataReg2_16[model_output_index + 5].ToFloat(),
552+
(clusterer.mPmemory->fragment).start + static_cast<float>(peak.time()) + clustererNN.mOutputDataReg2_16[model_output_index + 3].ToFloat(),
553+
clustererNN.mOutputDataReg2_16[model_output_index + 7].ToFloat(),
554+
clustererNN.mClusterFlags[2 * glo_idx],
555+
clustererNN.mClusterFlags[2 * glo_idx + 1]);
556556
} else if (dtype == 1) {
557557
pc.setFull(central_charge * clustererNN.mOutputDataReg2_32[model_output_index + 9],
558-
static_cast<float>(peak.pad()) + clustererNN.mOutputDataReg2_32[model_output_index + 1],
559-
clustererNN.mOutputDataReg2_32[model_output_index + 5],
560-
(clusterer.mPmemory->fragment).start + static_cast<float>(peak.time()) + clustererNN.mOutputDataReg2_32[model_output_index + 3],
561-
clustererNN.mOutputDataReg2_32[model_output_index + 7],
562-
clustererNN.mClusterFlags[2 * glo_idx],
563-
clustererNN.mClusterFlags[2 * glo_idx + 1]);
558+
static_cast<float>(peak.pad()) + clustererNN.mOutputDataReg2_32[model_output_index + 1],
559+
clustererNN.mOutputDataReg2_32[model_output_index + 5],
560+
(clusterer.mPmemory->fragment).start + static_cast<float>(peak.time()) + clustererNN.mOutputDataReg2_32[model_output_index + 3],
561+
clustererNN.mOutputDataReg2_32[model_output_index + 7],
562+
clustererNN.mClusterFlags[2 * glo_idx],
563+
clustererNN.mClusterFlags[2 * glo_idx + 1]);
564564
}
565565

566566
rejectCluster = !pc.toNative(peak, central_charge, myCluster, clusterer.Param(), chargeMap);

0 commit comments

Comments
 (0)