Inverse Fast Fourier Transform.
Compute the inverse FFT of some data in device memory using the specified plan.
Parameters: | x_gpu : pycuda.gpuarray.GPUArray
y_gpu : pycuda.gpuarray.GPUArray
plan : Plan
scale : bool, optional
|
---|
Notes
For complex to real transformations, this function assumes the input contains N/2+1 non-redundant FFT coefficents of a signal of length N.
Examples
>>> import pycuda.autoinit
>>> import pycuda.gpuarray as gpuarray
>>> import numpy as np
>>> N = 128
>>> x = np.asarray(np.random.rand(N), np.float32)
>>> xf = np.asarray(np.fft.fft(x), np.complex64)
>>> xf_gpu = gpuarray.to_gpu(xf[0:N/2+1])
>>> x_gpu = gpuarray.empty(N, np.float32)
>>> plan = Plan(N, np.complex64, np.float32)
>>> ifft(xf_gpu, x_gpu, plan, True)
>>> np.allclose(x, x_gpu.get(), atol=1e-6)
True