Skip to content

Commit

Permalink
remove spurious semicolons at the end of method implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
slava77devel committed Aug 5, 2024
1 parent d3549cb commit 8557644
Show file tree
Hide file tree
Showing 11 changed files with 87 additions and 87 deletions.
6 changes: 3 additions & 3 deletions RecoTracker/LSTCore/interface/Module.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ namespace lst {
} else {
return false;
}
};
}

static bool parseIsLower(bool isInvertedx, unsigned int detId) {
return (isInvertedx) ? !(detId & 1) : (detId & 1);
};
}

static unsigned int parsePartnerModuleId(unsigned int detId, bool isLowerx, bool isInvertedx) {
return isLowerx ? (isInvertedx ? detId - 1 : detId + 1) : (isInvertedx ? detId + 1 : detId - 1);
};
}

template <typename TBuff>
void setData(TBuff const& buf) {
Expand Down
12 changes: 6 additions & 6 deletions RecoTracker/LSTCore/src/ModuleMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ namespace lst {
for (unsigned int icondet = 0; icondet < totalSizes_neg; icondet++) {
connectedPixels[icondet + totalSizes + totalSizes_pos] = mmd.detIdToIndex.at(connectedModuleDetIds_neg[icondet]);
}
};
}

inline void fillConnectedModuleArrayExplicit(ModulesBuffer<alpaka_common::DevHost>& modulesBuf,
ModuleMetaData const& mmd,
Expand All @@ -111,7 +111,7 @@ namespace lst {
moduleMap[index * max_connected_modules + i] = mmd.detIdToIndex.at(connectedModules[i]);
}
}
};
}

inline void fillMapArraysExplicit(ModulesBuffer<alpaka_common::DevHost>& modulesBuf, ModuleMetaData const& mmd) {
uint16_t* mapIdx = alpaka::getPtrNative(modulesBuf.mapIdx_buf);
Expand All @@ -125,7 +125,7 @@ namespace lst {
mapdetId[counter] = detId;
counter++;
}
};
}

inline void setDerivedQuantities(unsigned int detId,
unsigned short& layer,
Expand All @@ -148,7 +148,7 @@ namespace lst {

r = std::sqrt(m_x * m_x + m_y * m_y + m_z * m_z);
eta = ((m_z > 0) - (m_z < 0)) * std::acosh(r / std::sqrt(m_x * m_x + m_y * m_y));
};
}

inline void loadCentroidsFromFile(const char* filePath, ModuleMetaData& mmd, uint16_t& nModules) {
std::ifstream ifile(filePath, std::ios::binary);
Expand Down Expand Up @@ -185,7 +185,7 @@ namespace lst {
mmd.detIdToIndex[1] = counter; //pixel module is the last module in the module list
counter++;
nModules = counter;
};
}

inline ModulesBuffer<alpaka_common::DevHost> loadModulesFromFile(MapPLStoLayer const& pLStoLayer,
const char* moduleMetaDataFilePath,
Expand Down Expand Up @@ -335,6 +335,6 @@ namespace lst {
fillMapArraysExplicit(modulesBuf, mmd);

return modulesBuf;
};
}
} // namespace lst
#endif
14 changes: 7 additions & 7 deletions RecoTracker/LSTCore/src/alpaka/Hit.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ namespace lst {
float rt = alpaka::math::sqrt(acc, x * x + y * y);
float eta = ((z > 0) - (z < 0)) * alpaka::math::acosh(acc, r3 / rt);
return eta;
};
}

template <typename TAcc>
ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE float phi_mpi_pi(TAcc const& acc, float x) {
Expand All @@ -123,24 +123,24 @@ namespace lst {
constexpr float o2pi = 1.f / (2.f * float(M_PI));
float n = alpaka::math::round(acc, x * o2pi);
return x - n * float(2.f * float(M_PI));
};
}

template <typename TAcc>
ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE float phi(TAcc const& acc, float x, float y) {
return phi_mpi_pi(acc, float(M_PI) + alpaka::math::atan2(acc, -y, -x));
};
}

template <typename TAcc>
ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE float deltaPhi(TAcc const& acc, float x1, float y1, float x2, float y2) {
float phi1 = phi(acc, x1, y1);
float phi2 = phi(acc, x2, y2);
return phi_mpi_pi(acc, (phi2 - phi1));
};
}

template <typename TAcc>
ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE float deltaPhiChange(TAcc const& acc, float x1, float y1, float x2, float y2) {
return deltaPhi(acc, x1, y1, x2 - x1, y2 - y1);
};
}

ALPAKA_FN_ACC ALPAKA_FN_INLINE float calculate_dPhi(float phi1, float phi2) {
// Calculate dPhi
Expand All @@ -154,7 +154,7 @@ namespace lst {
}

return dPhi;
};
}

ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE int binary_search(const unsigned int* data, // Array that we are searching over
unsigned int search_val, // Value we want to find in data array
Expand All @@ -175,7 +175,7 @@ namespace lst {
}
// Couldn't find search value in array.
return -1;
};
}

struct moduleRangesKernel {
template <typename TAcc>
Expand Down
14 changes: 7 additions & 7 deletions RecoTracker/LSTCore/src/alpaka/Kernels.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,23 @@ namespace lst {
unsigned int quintupletIndex,
bool secondpass = false) {
quintupletsInGPU.isDup[quintupletIndex] |= 1 + secondpass;
};
}

ALPAKA_FN_ACC ALPAKA_FN_INLINE void rmPixelTripletFromMemory(lst::PixelTriplets& pixelTripletsInGPU,
unsigned int pixelTripletIndex) {
pixelTripletsInGPU.isDup[pixelTripletIndex] = true;
};
}

ALPAKA_FN_ACC ALPAKA_FN_INLINE void rmPixelQuintupletFromMemory(lst::PixelQuintuplets& pixelQuintupletsInGPU,
unsigned int pixelQuintupletIndex) {
pixelQuintupletsInGPU.isDup[pixelQuintupletIndex] = true;
};
}

ALPAKA_FN_ACC ALPAKA_FN_INLINE void rmPixelSegmentFromMemory(lst::Segments& segmentsInGPU,
unsigned int pixelSegmentArrayIndex,
bool secondpass = false) {
segmentsInGPU.isDup[pixelSegmentArrayIndex] |= 1 + secondpass;
};
}

ALPAKA_FN_ACC ALPAKA_FN_INLINE int checkHitsT5(unsigned int ix,
unsigned int jx,
Expand All @@ -61,7 +61,7 @@ namespace lst {
}
}
return nMatched;
};
}

ALPAKA_FN_ACC ALPAKA_FN_INLINE int checkHitspT5(unsigned int ix,
unsigned int jx,
Expand All @@ -88,7 +88,7 @@ namespace lst {
}
}
return nMatched;
};
}

ALPAKA_FN_ACC ALPAKA_FN_INLINE void checkHitspT3(unsigned int ix,
unsigned int jx,
Expand Down Expand Up @@ -140,7 +140,7 @@ namespace lst {

matched[0] = npMatched;
matched[1] = nMatched;
};
}

struct removeDupQuintupletsInGPUAfterBuild {
template <typename TAcc>
Expand Down
16 changes: 8 additions & 8 deletions RecoTracker/LSTCore/src/alpaka/MiniDoublet.h
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ namespace lst {
mdsInGPU.outerHighEdgeY[idx] = hitsInGPU.highEdgeYs[outerHitIndex];
mdsInGPU.outerLowEdgeX[idx] = hitsInGPU.lowEdgeXs[outerHitIndex];
mdsInGPU.outerLowEdgeY[idx] = hitsInGPU.lowEdgeYs[outerHitIndex];
};
}

ALPAKA_FN_ACC ALPAKA_FN_INLINE float isTighterTiltedModules(lst::Modules const& modulesInGPU, uint16_t moduleIndex) {
// The "tighter" tilted modules are the subset of tilted modules that have smaller spacing
Expand All @@ -280,7 +280,7 @@ namespace lst {
return false;
} else
return false;
};
}

ALPAKA_FN_ACC ALPAKA_FN_INLINE float moduleGapSize(struct lst::Modules const& modulesInGPU, uint16_t moduleIndex) {
float miniDeltaTilted[3] = {0.26f, 0.26f, 0.26f};
Expand Down Expand Up @@ -331,7 +331,7 @@ namespace lst {
}

return moduleSeparation;
};
}

template <typename TAcc>
ALPAKA_FN_ACC ALPAKA_FN_INLINE float dPhiThreshold(
Expand Down Expand Up @@ -390,7 +390,7 @@ namespace lst {
else {
return miniSlope + alpaka::math::sqrt(acc, miniMuls * miniMuls + miniPVoff * miniPVoff + miniLum * miniLum);
}
};
}

template <typename TAcc>
ALPAKA_FN_INLINE ALPAKA_FN_ACC void shiftStripHits(TAcc const& acc,
Expand Down Expand Up @@ -556,7 +556,7 @@ namespace lst {
shiftedCoords[0] = xn;
shiftedCoords[1] = yn;
shiftedCoords[2] = zn;
};
}

template <typename TAcc>
ALPAKA_FN_ACC bool runMiniDoubletDefaultAlgo(TAcc const& acc,
Expand Down Expand Up @@ -628,7 +628,7 @@ namespace lst {
zUpper,
rtUpper);
}
};
}

template <typename TAcc>
ALPAKA_FN_ACC bool runMiniDoubletDefaultAlgoBarrel(TAcc const& acc,
Expand Down Expand Up @@ -755,7 +755,7 @@ namespace lst {
}

return alpaka::math::abs(acc, dPhiChange) < miniCut;
};
}

template <typename TAcc>
ALPAKA_FN_ACC bool runMiniDoubletDefaultAlgoEndcap(TAcc const& acc,
Expand Down Expand Up @@ -866,7 +866,7 @@ namespace lst {
noShiftedDphichange = noShiftedDphi / dzFrac * (1.f + dzFrac);

return alpaka::math::abs(acc, dPhiChange) < miniCut;
};
}

struct createMiniDoubletsInGPUv2 {
template <typename TAcc>
Expand Down
20 changes: 10 additions & 10 deletions RecoTracker/LSTCore/src/alpaka/PixelQuintuplet.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ namespace lst {
pixelQuintupletsInGPU.rzChiSquared[pixelQuintupletIndex] = rzChiSquared;
pixelQuintupletsInGPU.rPhiChiSquared[pixelQuintupletIndex] = rPhiChiSquared;
pixelQuintupletsInGPU.rPhiChiSquaredInwards[pixelQuintupletIndex] = rPhiChiSquaredInwards;
};
}

ALPAKA_FN_ACC ALPAKA_FN_INLINE bool passPT5RZChiSquaredCuts(lst::Modules const& modulesInGPU,
uint16_t lowerModuleIndex1,
Expand Down Expand Up @@ -291,7 +291,7 @@ namespace lst {
}
}
return true;
};
}

ALPAKA_FN_ACC ALPAKA_FN_INLINE bool passPT5RPhiChiSquaredCuts(lst::Modules const& modulesInGPU,
uint16_t lowerModuleIndex1,
Expand Down Expand Up @@ -381,7 +381,7 @@ namespace lst {
}
}
return true;
};
}

template <typename TAcc>
ALPAKA_FN_ACC ALPAKA_FN_INLINE float computeChiSquaredpT5(TAcc const& acc,
Expand Down Expand Up @@ -427,7 +427,7 @@ namespace lst {
(xs[i] * xs[i] + ys[i] * ys[i] - 2 * g * xs[i] - 2 * f * ys[i] + c) / (sigma2);
}
return chiSquared;
};
}

template <typename TAcc>
ALPAKA_FN_ACC ALPAKA_FN_INLINE void computeSigmasForRegression_pT5(TAcc const& acc,
Expand Down Expand Up @@ -513,7 +513,7 @@ namespace lst {
}
#endif
}
};
}

template <typename TAcc>
ALPAKA_FN_ACC ALPAKA_FN_INLINE float computePT5RPhiChiSquared(TAcc const& acc,
Expand All @@ -536,7 +536,7 @@ namespace lst {
chiSquared = computeChiSquaredpT5(acc, 5, xs, ys, delta1, delta2, slopes, isFlat, g, f, radius);

return chiSquared;
};
}

ALPAKA_FN_ACC ALPAKA_FN_INLINE float computePT5RPhiChiSquaredInwards(
float g, float f, float r, float* xPix, float* yPix) {
Expand All @@ -551,7 +551,7 @@ namespace lst {
}
chiSquared *= 0.5f;
return chiSquared;
};
}

ALPAKA_FN_ACC ALPAKA_FN_INLINE bool passPT5RPhiChiSquaredInwardsCuts(lst::Modules const& modulesInGPU,
uint16_t lowerModuleIndex1,
Expand Down Expand Up @@ -641,7 +641,7 @@ namespace lst {
}
}
return true;
};
}

template <typename TAcc>
ALPAKA_FN_ACC ALPAKA_FN_INLINE bool runPixelQuintupletDefaultAlgo(TAcc const& acc,
Expand Down Expand Up @@ -787,7 +787,7 @@ namespace lst {
centerY = (centerY + T5CenterY) / 2;

return true;
};
}

template <typename TAcc>
ALPAKA_FN_ACC ALPAKA_FN_INLINE float computePT5RZChiSquared(TAcc const& acc,
Expand Down Expand Up @@ -831,7 +831,7 @@ namespace lst {

RMSE = alpaka::math::sqrt(acc, 0.2f * RMSE); // Divided by the degree of freedom 5.
return RMSE;
};
}

struct createPixelQuintupletsInGPUFromMapv2 {
template <typename TAcc>
Expand Down
6 changes: 3 additions & 3 deletions RecoTracker/LSTCore/src/alpaka/PixelTriplet.h
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,7 @@ namespace lst {
//2nd update
pt_beta = dr * lst::k2Rinv1GeVf / alpaka::math::sin(acc, betaAv); //get a better pt estimate
}
};
}

template <typename TAcc>
ALPAKA_FN_ACC ALPAKA_FN_INLINE bool runTripletDefaultAlgoPPBB(TAcc const& acc,
Expand Down Expand Up @@ -1425,7 +1425,7 @@ namespace lst {
(alpaka::math::abs(acc, betaInRHmin - betaInRHmax) + alpaka::math::abs(acc, betaOutRHmin - betaOutRHmax)));
float dBeta = betaIn - betaOut;
return dBeta * dBeta <= dBetaCut2;
};
}

template <typename TAcc>
ALPAKA_FN_ACC ALPAKA_FN_INLINE bool runTripletDefaultAlgoPPEE(TAcc const& acc,
Expand Down Expand Up @@ -1689,7 +1689,7 @@ namespace lst {
(alpaka::math::abs(acc, betaInRHmin - betaInRHmax) + alpaka::math::abs(acc, betaOutRHmin - betaOutRHmax)));
float dBeta = betaIn - betaOut;
return dBeta * dBeta <= dBetaCut2;
};
}

} // namespace lst
#endif
Loading

0 comments on commit 8557644

Please sign in to comment.