Skip to content

Commit

Permalink
clang does not allow initialization of variable length arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
gartung committed May 9, 2022
1 parent bf39a2b commit 3ebd8b5
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions RecoTracker/MkFitCore/src/PropagationMPlex.icc
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,16 @@ static inline void helixAtRFromIterativeCCS_impl(const Tf& __restrict__ inPar,
kinv[n-nmin] = 1.f / k[n-nmin];
pt[n-nmin] = 1.f / ipt[n-nmin];
}
float D[nmax-nmin]={0.};
float cosa[nmax-nmin]={0.};
float sina[nmax-nmin]={0.};
float cosah[nmax-nmin]={0.};
float sinah[nmax-nmin]={0.};
float id[nmax-nmin]={0.};
float D[nmax-nmin];
float cosa[nmax-nmin];
float sina[nmax-nmin];
float cosah[nmax-nmin];
float sinah[nmax-nmin];
float id[nmax-nmin];

//no trig approx here, phi can be large
float cosPorT[nmax-nmin]={0.};
float sinPorT[nmax-nmin]={0.};
float cosPorT[nmax-nmin];
float sinPorT[nmax-nmin];
#pragma omp simd
for (int n = nmin; n < nmax; ++n) {
cosPorT[n-nmin] = std::cos(phiin[n-nmin]);
Expand All @@ -107,8 +107,8 @@ static inline void helixAtRFromIterativeCCS_impl(const Tf& __restrict__ inPar,
sinPorT[n-nmin] = std::sin(phiin[n-nmin]);
}

float pxin[nmax-nmin]={0.};
float pyin[nmax-nmin]={0.};
float pxin[nmax-nmin];
float pyin[nmax-nmin];
#pragma omp simd
for (int n = nmin; n < nmax; ++n) {
pxin[n-nmin] = cosPorT[n-nmin] * pt[n-nmin];
Expand Down

0 comments on commit 3ebd8b5

Please sign in to comment.