Fourier library: Operations in the Fourier domain

◆ createplanr2c()

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

Definition at line 153 of file fftwaffar.cc.

References FOURIER_assert, Mplanr2c, Mseriesarray, and Mspectrumarray.

Referenced by r2c().

154  {
155  if (Mplanr2c==0)
156  {
157  // overall parameters
158  // ------------------
159  // tranformation only along one dimension
160  const int rank=1;
161  // size of each series
162  int n=Mseriesarray.size(0);
163  // number of signals to be transformed
164  const int howmany=Mseriesarray.size(1);
165  // quick design
166  const unsigned flags=FFTW_ESTIMATE;
167 
168  // input array
169  // -----------
170  aff::CArray<TAseries::Tvalue> Cseriesarray(Mseriesarray);
171  // one-dimensional transform: use default
172  int* inembed=0;
173  // distance to next sample
174  const int istride=Cseriesarray.stride(0);
175  // distance to next signal
176  const int idist=Cseriesarray.stride(1);
177  // casted pointer
178  double* in=Cseriesarray.castedpointer<double>();
179 
180  // output array
181  // ------------
182  aff::CArray<TAspectrum::Tvalue> Cspectrumarray(Mspectrumarray);
183  // one-dimensional transform: use default
184  int* onembed=0;
185  // distance to next sample
186  const int ostride=Cspectrumarray.stride(0);
187  // distance to next signal
188  const int odist=Cspectrumarray.stride(1);
189  // casted pointer
190  fftw_complex* out=Cspectrumarray.castedpointer<fftw_complex>();
191 
192  // create plan
193  Mplanr2c=fftw_plan_many_dft_r2c(rank, &n, howmany,
194  in, inembed, istride, idist,
195  out, onembed, ostride, odist,
196  flags);
197  FOURIER_assert(Mplanr2c!=0, "ERROR: creating r2c plan");
198  }
199  } // void DRFFTWAFFArrayEngine::createplanr2c()
#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: