diff --git a/IFFTW/fftwserver.cc b/IFFTW/fftwserver.cc index 24eb1a6c22fec13e4a95b147fa84a442de7da237..ec66e7689d73aac4546fd8a5133be05c9fbef9c2 100644 --- a/IFFTW/fftwserver.cc +++ b/IFFTW/fftwserver.cc @@ -208,6 +208,7 @@ void FFTWServer::FFTBackward(TArray< complex<r_8> > const & in, TArray< complex< } if (_pndb) _pndb->Recreate(in.NbDimensions(), sz); else _pndb = new FFTWServerPlan(in.NbDimensions(), sz, FFTW_BACKWARD, false); + fftwnd_one(_pndb->pnd, (fftw_complex *)(in.Data()) , (fftw_complex *)(out.Data()) ); } return; @@ -217,11 +218,11 @@ void FFTWServer::FFTBackward(TArray< complex<r_8> > const & in, TArray< complex< void FFTWServer::FFTForward(TArray< r_8 > const & in, TArray< complex<r_8> > & out) { int rank = ckR8.CheckResize(in, out); - TArray<r_8> outtemp(in, false); - if (rank == 1) { // One dimensional transform if (_p1drf) _p1drf->Recreate(in.Size()); else _p1drf = new FFTWServerPlan(in.Size(), FFTW_REAL_TO_COMPLEX, true); + TArray<r_8> outtemp; + outtemp.ReSize(in); rfftw_one(_p1drf->rp, (fftw_real *)(in.Data()) , (fftw_real *)(outtemp.Data())); ReShapetoCompl(outtemp, out); } @@ -251,13 +252,14 @@ void FFTWServer::FFTBackward(TArray< complex<r_8> > const & in, TArray< r_8 > & int rank = ckR8.CheckResize(in, out); if (rank == 1) { // One dimensional transform - TArray<r_8> intemp(out, false); + TArray<r_8> intemp; + intemp.ReSize(out); if (_p1drb) _p1drb->Recreate(out.Size()); else _p1drb = new FFTWServerPlan(out.Size(), FFTW_COMPLEX_TO_REAL, true); ReShapetoReal(in, intemp); - cerr << " DEBUG-FFTWServer::FFTBackward() in = \n" << in << endl; - cerr << " DEBUG-FFTWServer::FFTBackward() intemp = \n" << intemp << endl; + // cerr << " DEBUG-FFTWServer::FFTBackward() in = \n" << in << endl; + // cerr << " DEBUG-FFTWServer::FFTBackward() intemp = \n" << intemp << endl; rfftw_one(_p1drb->rp, (fftw_real *)(intemp.Data()) , (fftw_real *)(out.Data())); }