Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
Apply clang-format changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ariostas committed Jan 30, 2024
1 parent 87ab527 commit c293e01
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
7 changes: 4 additions & 3 deletions SDL/Hit.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,13 @@ namespace SDL {
hitsInGPU.lowEdgeYs[ihit] = ihit_y - 2.5f * sin_phi;
}
// Need to set initial value if index hasn't been seen before.
int old = alpaka::atomicOp<alpaka::AtomicCas>(acc, &(hitsInGPU.hitRanges[lastModuleIndex * 2]), -1, (int) ihit);
int old = alpaka::atomicOp<alpaka::AtomicCas>(
acc, &(hitsInGPU.hitRanges[lastModuleIndex * 2]), -1, static_cast<int>(ihit));
// For subsequent visits, stores the min value.
if (old != -1)
alpaka::atomicOp<alpaka::AtomicMin>(acc, &hitsInGPU.hitRanges[lastModuleIndex * 2], (int) ihit);
alpaka::atomicOp<alpaka::AtomicMin>(acc, &hitsInGPU.hitRanges[lastModuleIndex * 2], static_cast<int>(ihit));

alpaka::atomicOp<alpaka::AtomicMax>(acc, &hitsInGPU.hitRanges[lastModuleIndex * 2 + 1], (int) ihit);
alpaka::atomicOp<alpaka::AtomicMax>(acc, &hitsInGPU.hitRanges[lastModuleIndex * 2 + 1], static_cast<int>(ihit));
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion SDL/LST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ void SDL::LST::prepareInput(const std::vector<float> see_px,
std::iota(hitIdxs.begin(), hitIdxs.end(), 0);
const int hit_size = trkX.size();

for(size_t iSeed = 0; iSeed < n_see; iSeed++) {
for (size_t iSeed = 0; iSeed < n_see; iSeed++) {
ROOT::Math::PxPyPzMVector p3LH(see_stateTrajGlbPx[iSeed], see_stateTrajGlbPy[iSeed], see_stateTrajGlbPz[iSeed], 0);
ROOT::Math::XYZVector p3LH_helper(see_stateTrajGlbPx[iSeed], see_stateTrajGlbPy[iSeed], see_stateTrajGlbPz[iSeed]);
float ptIn = p3LH.Pt();
Expand Down
3 changes: 2 additions & 1 deletion SDL/PixelTriplet.h
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,8 @@ namespace SDL {
printf("Pixel Triplet excess alert!\n");
#endif
} else {
unsigned int pixelTripletIndex = alpaka::atomicOp<alpaka::AtomicAdd>(acc, pixelTripletsInGPU.nPixelTriplets, 1u);
unsigned int pixelTripletIndex =
alpaka::atomicOp<alpaka::AtomicAdd>(acc, pixelTripletsInGPU.nPixelTriplets, 1u);
addPixelTripletToMemory(modulesInGPU,
mdsInGPU,
segmentsInGPU,
Expand Down
2 changes: 1 addition & 1 deletion SDL/Segment.h
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ namespace SDL {
if (pass) {
unsigned int totOccupancySegments = alpaka::atomicOp<alpaka::AtomicAdd>(
acc, &segmentsInGPU.totOccupancySegments[innerLowerModuleIndex], 1u);
if (totOccupancySegments >= (unsigned int) (rangesInGPU.segmentModuleOccupancy[innerLowerModuleIndex])) {
if (static_cast<int>(totOccupancySegments) >= rangesInGPU.segmentModuleOccupancy[innerLowerModuleIndex]) {
#ifdef Warnings
printf("Segment excess alert! Module index = %d\n", innerLowerModuleIndex);
#endif
Expand Down
3 changes: 2 additions & 1 deletion SDL/TrackCandidate.h
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,8 @@ namespace SDL {
if (pixelQuintupletsInGPU.isDup[pixelQuintupletIndex])
continue;

unsigned int trackCandidateIdx = alpaka::atomicOp<alpaka::AtomicAdd>(acc, trackCandidatesInGPU.nTrackCandidates, 1u);
unsigned int trackCandidateIdx =
alpaka::atomicOp<alpaka::AtomicAdd>(acc, trackCandidatesInGPU.nTrackCandidates, 1u);
if (trackCandidateIdx >= N_MAX_PIXEL_TRACK_CANDIDATES) // No other TCs have been added yet
{
#ifdef Warnings
Expand Down
3 changes: 2 additions & 1 deletion SDL/Triplet.h
Original file line number Diff line number Diff line change
Expand Up @@ -1971,7 +1971,8 @@ namespace SDL {
if (success) {
unsigned int totOccupancyTriplets = alpaka::atomicOp<alpaka::AtomicAdd>(
acc, &tripletsInGPU.totOccupancyTriplets[innerInnerLowerModuleIndex], 1u);
if (totOccupancyTriplets >= (unsigned int) (rangesInGPU.tripletModuleOccupancy[innerInnerLowerModuleIndex])) {
if (static_cast<int>(totOccupancyTriplets) >=
rangesInGPU.tripletModuleOccupancy[innerInnerLowerModuleIndex]) {
#ifdef Warnings
printf("Triplet excess alert! Module index = %d\n", innerInnerLowerModuleIndex);
#endif
Expand Down

0 comments on commit c293e01

Please sign in to comment.