Former-commit-id: ce1f24b4b792b797985113d2c76f2191847c91ac
This commit is contained in:
Marek Nečada 2018-09-02 06:19:50 +03:00
parent 6c09121a5d
commit 83253bfc0c
3 changed files with 5 additions and 4 deletions

View File

@ -19,7 +19,8 @@ typedef size_t qpms_y_t;
typedef enum {
QPMS_SUCCESS = 0,
QPMS_ERROR = 1
QPMS_ERROR = 1,
QPMS_ENOMEM = 8
} qpms_errno_t;
// Normalisations

View File

@ -495,8 +495,8 @@ void qpms_trans_calculator_free(qpms_trans_calculator *c) {
free(c->B_multipliers);
#ifdef LATTICESUMS_OLD
free(c->hct);
free(c->legendre0);
#endif
free(c->legendre0);
free(c);
}
@ -907,10 +907,10 @@ qpms_trans_calculator
free(qmaxes);
#ifdef LATTICESUMS_OLD
c->hct = hankelcoefftable_init(2*lMax+1);
#endif
c->legendre0 = malloc(gsl_sf_legendre_array_n(2*lMax+1) * sizeof(double));
if (gsl_sf_legendre_array_e(GSL_SF_LEGENDRE_NONE,2*lMax+1,
0,-1,c->legendre0)) abort(); // TODO maybe use some "precise" analytical formula instead?
#endif
return c;
}

View File

@ -47,8 +47,8 @@ typedef struct qpms_trans_calculator {
#endif
#ifdef LATTICESUMS_OLD
complex double *hct; // Hankel function coefficient table
double *legendre0; // Zero-argument Legendre functions this might go outside #ifdef in the end...
#endif
double *legendre0; // Zero-argument Legendre functions this might go outside #ifdef in the end...
} qpms_trans_calculator;