Skip to content

Commit

Permalink
Incorporate Dan Riley's suggested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gartung committed May 13, 2022
1 parent d6ae2c9 commit dbc748c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
5 changes: 1 addition & 4 deletions RecoTracker/MkFitCore/src/PropagationMPlex.cc
Original file line number Diff line number Diff line change
Expand Up @@ -782,9 +782,6 @@ namespace mkfit {
#pragma omp simd
for (int n = 0; n < NN; ++n) {
cosP[n] = std::cos(phiin[n]);
}
#pragma omp simd
for (int n = 0; n < NN; ++n) {
sinP[n] = std::sin(phiin[n]);
}
float cosT[NN];
Expand Down Expand Up @@ -839,7 +836,7 @@ namespace mkfit {
}
float cosahTmp[NN] = {0.};
float sinahTmp[NN] = {0.};
if (Config::useTrigApprox) {
if constexpr (Config::useTrigApprox) {
#pragma omp simd
for (int n = 0; n < NN; ++n) {
sincos4(alpha[n] * 0.5f, sinahTmp[n], cosahTmp[n]);
Expand Down
10 changes: 10 additions & 0 deletions RecoTracker/MkFitCore/src/PropagationMPlex.icc
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,17 @@ static inline void helixAtRFromIterativeCCS_impl(const Tf& __restrict__ inPar,
#pragma omp simd
for (int n = nmin; n < nmax; ++n) {
cosPorT[n-nmin] = std::cos(phiin[n-nmin]);
}
#pragma omp simd
for (int n = nmin; n < nmax; ++n) {
sinPorT[n-nmin] = std::sin(phiin[n-nmin]);
}
float pxin[nmax-nmin]={0.};
float pyin[nmax-nmin]={0.};
#pragma omp simd
for (int n = nmin; n < nmax; ++n) {
pxin[n-nmin] = cosPorT[n-nmin] * pt[n-nmin];
}
#pragma omp simd
for (int n = nmin; n < nmax; ++n) {
pxin[n-nmin] = cosPorT[n-nmin] * pt[n-nmin];
Expand All @@ -123,6 +130,9 @@ static inline void helixAtRFromIterativeCCS_impl(const Tf& __restrict__ inPar,
for (int n = nmin; n < nmax; ++n) {
//derivatives initialized to value for first iteration, i.e. distance = r-r0in
dDdx[n-nmin] = r0[n-nmin] > 0.f ? -xin[n-nmin] / r0[n-nmin] : 0.f;
}
#pragma omp simd
for (int n = nmin; n < nmax; ++n) {
dDdy[n-nmin] = r0[n-nmin] > 0.f ? -yin[n-nmin] / r0[n-nmin] : 0.f;
}
float oodotp[nmax-nmin];
Expand Down

0 comments on commit dbc748c

Please sign in to comment.