Skip to content

Commit 0ceb5ce

Browse files
authored
Merge pull request #46944 from dan131riley/clang-warnings
silence clang vectorization warnings
2 parents ffa20f8 + 899e6b7 commit 0ceb5ce

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

RecoTracker/MkFitCore/src/MkBuilder.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ namespace mkfit {
660660
continue;
661661
}
662662
// Check if the candidate is close to it's max_r, pi/2 - 0.2 rad (11.5 deg)
663-
if (iteration_dir == SteeringParams::IT_FwdSearch && ccand[ic].pT() < 1.2) {
663+
if (iteration_dir == SteeringParams::IT_FwdSearch && ccand[ic].pT() < 1.2f) {
664664
const float dphi = std::abs(ccand[ic].posPhi() - ccand[ic].momPhi());
665665
if (ccand[ic].posRsq() > 625.f && dphi > 1.371f && dphi < 4.512f) {
666666
// printf("Stopping cand at r=%f, posPhi=%.1f momPhi=%.2f pt=%.2f emomEta=%.2f\n",

RecoTracker/MkFitCore/src/PropagationMPlex.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,20 +1001,22 @@ namespace mkfit {
10011001

10021002
const TrackerInfo& tinfo = *pflags.tracker_info;
10031003

1004+
#if !defined(__clang__)
10041005
#pragma omp simd
1006+
#endif
10051007
for (int n = 0; n < NN; ++n) {
10061008
if (n < N_proc) {
10071009
if (outFailFlag(n, 0, 0) || (noMatEffPtr && noMatEffPtr->constAt(n, 0, 0))) {
10081010
hitsRl(n, 0, 0) = 0.f;
10091011
hitsXi(n, 0, 0) = 0.f;
10101012
} else {
1011-
auto mat = tinfo.material_checked(std::abs(outPar(n, 2, 0)), msRad(n, 0, 0));
1013+
const auto mat = tinfo.material_checked(std::abs(outPar(n, 2, 0)), msRad(n, 0, 0));
10121014
hitsRl(n, 0, 0) = mat.radl;
10131015
hitsXi(n, 0, 0) = mat.bbxi;
10141016
}
10151017
const float r0 = hipo(inPar(n, 0, 0), inPar(n, 1, 0));
10161018
const float r = msRad(n, 0, 0);
1017-
propSign(n, 0, 0) = (r > r0 ? 1. : -1.);
1019+
propSign(n, 0, 0) = (r > r0 ? 1.f : -1.f);
10181020
}
10191021
}
10201022
MPlexHV plNrm;

RecoTracker/MkFitCore/src/PropagationMPlexEndcap.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,16 @@ namespace mkfit {
129129

130130
const TrackerInfo& tinfo = *pflags.tracker_info;
131131

132+
#if !defined(__clang__)
132133
#pragma omp simd
134+
#endif
133135
for (int n = 0; n < NN; ++n) {
134136
if (n >= N_proc || (noMatEffPtr && noMatEffPtr->constAt(n, 0, 0))) {
135137
hitsRl(n, 0, 0) = 0.f;
136138
hitsXi(n, 0, 0) = 0.f;
137139
} else {
138-
const float hypo = std::hypot(outPar(n, 0, 0), outPar(n, 1, 0));
139-
auto mat = tinfo.material_checked(std::abs(msZ(n, 0, 0)), hypo);
140+
const auto hypo = std::hypot(outPar(n, 0, 0), outPar(n, 1, 0));
141+
const auto mat = tinfo.material_checked(std::abs(msZ(n, 0, 0)), hypo);
140142
hitsRl(n, 0, 0) = mat.radl;
141143
hitsXi(n, 0, 0) = mat.bbxi;
142144
}

RecoTracker/MkFitCore/src/PropagationMPlexPlane.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,14 +651,16 @@ namespace mkfit {
651651

652652
const TrackerInfo& tinfo = *pflags.tracker_info;
653653

654+
#if !defined(__clang__)
654655
#pragma omp simd
656+
#endif
655657
for (int n = 0; n < NN; ++n) {
656658
if (n >= N_proc || (noMatEffPtr && noMatEffPtr->constAt(n, 0, 0))) {
657659
hitsRl(n, 0, 0) = 0.f;
658660
hitsXi(n, 0, 0) = 0.f;
659661
} else {
660662
const float hypo = std::hypot(outPar(n, 0, 0), outPar(n, 1, 0));
661-
auto mat = tinfo.material_checked(std::abs(outPar(n, 2, 0)), hypo);
663+
const auto mat = tinfo.material_checked(std::abs(outPar(n, 2, 0)), hypo);
662664
hitsRl(n, 0, 0) = mat.radl;
663665
hitsXi(n, 0, 0) = mat.bbxi;
664666
}

0 commit comments

Comments
 (0)