From abf3b053d7c48668542bb6e22f10e64960378127 Mon Sep 17 00:00:00 2001 From: Martin Reinecke Date: Sat, 22 Dec 2018 11:57:33 +0100 Subject: [PATCH] remark --- libsharp/sharp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libsharp/sharp.c b/libsharp/sharp.c index bbb3872..d4a5d20 100644 --- a/libsharp/sharp.c +++ b/libsharp/sharp.c @@ -108,15 +108,16 @@ NOINLINE static void ringhelper_update (ringhelper *self, int nph, int mmax, dou RESIZE (self->shiftarr,dcmplx,mmax+1); self->s_shift = mmax+1; self->phi0_ = phi0; +// FIXME: improve this by using sincos2pibyn(nph) etc. for (int m=0; m<=mmax; ++m) self->shiftarr[m] = cos(m*phi0) + _Complex_I*sin(m*phi0); // double *tmp=(double *) self->shiftarr; // sincos_multi (mmax+1, phi0, &tmp[1], &tmp[0], 2); } - if (!self->plan) self->plan=make_rfft_plan(nph); +// if (!self->plan) self->plan=make_rfft_plan(nph); if (nph!=(int)self->length) { - destroy_rfft_plan(self->plan); + if (self->plan) destroy_rfft_plan(self->plan); self->plan=make_rfft_plan(nph); self->length=nph; }