Expose qpms_trans_calculator_get_AB_arrays_precalcbuf()

Former-commit-id: 151d3f7bf615366cad3da5589f3165f452c00474
This commit is contained in:
Marek Nečada 2020-01-23 17:01:31 +02:00
parent f33b102768
commit 2f03fc58b4
2 changed files with 11 additions and 5 deletions

View File

@ -610,12 +610,14 @@ int qpms_trans_calculator_get_AB_buf_p(const qpms_trans_calculator *c,
}
int qpms_trans_calculator_get_AB_arrays_precalcbuf(const qpms_trans_calculator *c,
complex double *Adest, complex double *Bdest,
qpms_y_t lMax, complex double *Adest, complex double *Bdest,
size_t deststride, size_t srcstride, double kdlj_phi,
const complex double *bessel_buf, const double *legendre_buf) {
if(lMax == 0) lMax = c->lMax;
QPMS_ASSERT(lMax <= c->lMax);
size_t desti = 0, srci = 0;
for (int n = 1; n <= c->lMax; ++n) for (int m = -n; m <= n; ++m) {
for (int nu = 1; nu <= c->lMax; ++nu) for (int mu = -nu; mu <= nu; ++mu) {
for (int n = 1; n <= lMax; ++n) for (int m = -n; m <= n; ++m) {
for (int nu = 1; nu <= lMax; ++nu) for (int mu = -nu; mu <= nu; ++mu) {
#ifndef NDEBUG
size_t assertindex = qpms_trans_calculator_index_mnmunu(c,m,n,mu,nu);
#endif
@ -655,7 +657,7 @@ int qpms_trans_calculator_get_AB_arrays_buf(const qpms_trans_calculator *c,
costheta,-1,legendre_buf));
QPMS_ENSURE_SUCCESS(qpms_sph_bessel_fill(J, 2*c->lMax+1, kdlj.r, bessel_buf));
}
return qpms_trans_calculator_get_AB_arrays_precalcbuf(c, Adest, Bdest,
return qpms_trans_calculator_get_AB_arrays_precalcbuf(c, c->lMax, Adest, Bdest,
deststride, srcstride, kdlj.phi, bessel_buf, legendre_buf);
}

View File

@ -34,5 +34,9 @@ static inline void qpms_trans_array_from_AB(
}
}
int qpms_trans_calculator_get_AB_arrays_precalcbuf(const qpms_trans_calculator *c,
qpms_y_t lMax, complex double *Adest, complex double *Bdest,
size_t deststride, size_t srcstride, double kdlj_phi,
const complex double *bessel_buf, const double *legendre_buf);
#endif