/// <summary> /// Create a 1D real to complex transform plan (fftw_plan_dft_r2c_1d). /// </summary> /// <param name="n">The logical size of the transform.</param> /// <param name="input">FFTW array of 8-byte real numbers.</param> /// <param name="output">FFTW array of 16-byte complex numbers.</param> /// <param name="flags">Flags that specify the behavior of the planner.</param> /// <returns>The FFTW plan.</returns> public static Plan Create1(int n, RealArray input, ComplexArray output, Options flags) { mutex.WaitOne(); var handle = NativeMethods.fftw_plan_dft_r2c_1d(n, input.Handle, output.Handle, flags); mutex.ReleaseMutex(); return(new Plan(handle, input, output, false)); }
/// <summary> /// Create a complex transform plan (fftw_plan_dft). /// </summary> /// <param name="rank">Number of dimensions.</param> /// <param name="n">Array containing the logical size along each dimension.</param> /// <param name="input">FFTW array of 16-byte complex numbers.</param> /// <param name="output">FFTW array of 16-byte complex numbers.</param> /// <param name="direction"></param> /// <param name="flags">Flags that specify the behavior of the planner.</param> /// <returns>The FFTW plan.</returns> public static Plan Create(int rank, int[] n, ComplexArray input, ComplexArray output, Direction direction, Options flags) { mutex.WaitOne(); var handle = NativeMethods.fftw_plan_dft(rank, n, input.Handle, output.Handle, direction, flags); mutex.ReleaseMutex(); return(new Plan(handle, input, output, false)); }