cuFFT

Provides FFT and inverse FFT for 1D, 2D and 3D arrays. See NVIDIA cuFFT.

Note

cuFFT only supports FFT operations on numpy.float32, numpy float64, numpy.complex64, numpy.complex128 with C-contiguous datalayout.

Forward FFT

accelerate.cuda.fft.fft(ary, out[, stream])
accelerate.cuda.fft.fft_inplace(ary[, stream])
Parameters:
  • ary – The input array. The inplace version stores the result in here.
  • out – The output array for non-inplace versions.
  • stream – The CUDA stream in which all operations will take place.

Inverse FFT

accelerate.cuda.fft.ifft(ary, out[, stream])
accelerate.cuda.fft.ifft_inplace(ary[, stream])
Parameters:
  • ary – The input array. The inplace version stores the result in here.
  • out – The output array for non-inplace versions.
  • stream – The CUDA stream in which all operations will take place.

FFTPlan

class accelerate.cuda.fft.FFTPlan(*args, **kws)
Parameters:
  • shape – Input array shape.
  • itype – Input data type.
  • otype – Output data type.
  • batch – Maximum number of operation to perform.
  • stream – A CUDA stream for all the operations to put on.
  • mode – Operation mode; e.g. MODE_NATIVE, MODE_FFTW_PADDING, MODE_FFTW_ASYMMETRIC, MODE_FFTW_ALL, MODE_DEFAULT.
forward(ary, out=None)

Perform forward FFT

Parameters:
  • ary – Input array
  • out – Optional output array
Returns:

The output array or a new numpy array is out is None.

Note

If ary is out, an inplace operation is performed.

inverse(ary, out=None)

Perform inverse FFT

Parameters:
  • ary – Input array
  • out – Optional output array
Returns:

The output array or a new numpy array is out is None.