nabu.processing.fft_opencl
source module nabu.processing.fft_opencl
Classes
-
VKCLFFT — OpenCL FFT, using VKFFT backend
Functions
-
has_vkfft — Determine whether pyvkfft is available. This function cannot be tested from a notebook/console, a proper entry point has to be created (if name == "main").
source get_vkfft_opencl(slf, *args, **kwargs)
source class VKCLFFT(shape, dtype, r2c=True, axes=None, normalize='rescale', **backend_options)
Bases : _BaseVKFFT
OpenCL FFT, using VKFFT backend
Base class for Fast Fourier Transform (FFT).
Parameters
-
shape : list of int — Shape of the input data
-
dtype : str or numpy.dtype — Data type of the input data
-
r2c : bool, optional — Whether to use real-to-complex transform for real-valued input. Default is True.
-
axes : list of int, optional — Axes along which FFT is computed. * For 2D transform: axes=(1,0) * For batched 1D transform of 2D image: axes=(-1,)
-
normalize : str, optional — Whether to normalize FFT and IFFT. Possible values are: * "rescale": in this case, Fourier data is divided by "N" before IFFT, so that IFFT(FFT(data)) = data. This corresponds to numpy norm=None i.e norm="backward". * "ortho": in this case, FFT and IFFT are adjoint of each other, the transform is unitary. Both FFT and IFFT are scaled with 1/sqrt(N). * "none": no normalization is done : IFFT(FFT(data)) = data*N
Other Parameters
backend_options: dict, optional Parameters to pass to CudaProcessing or OpenCLProcessing class.
Determine whether pyvkfft is available. This function cannot be tested from a notebook/console, a proper entry point has to be created (if name == "main").