Fourier library: Operations in the Fourier domain

◆ createplanc2r()

void fourier::fft::DRFFTWAFFArrayEngine::createplanc2r ( )
private

Definition at line 203 of file fftwaffar.cc.

References FOURIER_assert, Mplanc2r, Mseriesarray, and Mspectrumarray.

Referenced by c2r().

204  {
205  if (Mplanc2r==0)
206  {
207  // overall parameters
208  // ------------------
209  // tranformation only along one dimension
210  const int rank=1;
211  // size of each series
212  int n=Mseriesarray.size(0);
213  // number of signals to be transformed
214  const int howmany=Mseriesarray.size(1);
215  // quick design
216  const unsigned flags=FFTW_ESTIMATE;
217 
218  // input array
219  // -----------
220  aff::CArray<TAspectrum::Tvalue> Cspectrumarray(Mspectrumarray);
221  // one-dimensional transform: use default
222  int* inembed=0;
223  // distance to next sample
224  const int istride=Cspectrumarray.stride(0);
225  // distance to next signal
226  const int idist=Cspectrumarray.stride(1);
227  // casted pointer
228  fftw_complex* in=Cspectrumarray.castedpointer<fftw_complex>();
229 
230  // output array
231  // ------------
232  aff::CArray<TAseries::Tvalue> Cseriesarray(Mseriesarray);
233  // one-dimensional transform: use default
234  int* onembed=0;
235  // distance to next sample
236  const int ostride=Cseriesarray.stride(0);
237  // distance to next signal
238  const int odist=Cseriesarray.stride(1);
239  // casted pointer
240  double* out=Cseriesarray.castedpointer<double>();
241 
242  // create plan
243  Mplanc2r=fftw_plan_many_dft_c2r(rank, &n, howmany,
244  in, inembed, istride, idist,
245  out, onembed, ostride, odist,
246  flags);
247  FOURIER_assert(Mplanc2r!=0, "ERROR: creating c2r plan");
248  }
249  } // void DRFFTWAFFArrayEngine::createplanc2r()
#define FOURIER_assert(C, M)
Check an assertion and report by throwing an exception.
Definition: error.h:141
Here is the caller graph for this function: