.. SPDX-FileCopyrightText: (C) The Kokkos-FFT development team, see COPYRIGHT.md file .. .. SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception .. _api_reference: API Reference ============= This section documents the public user interface of ``Kokkos-FFT``. APIs are defined in ``KokkosFFT`` namespace and implementation details are defined in ``KokkosFFT::Impl`` namespace. Thus, it is highly discouraged for users to access functions in ``KokkosFFT::Impl`` namespace. Except for ``KokkosFFT::Plan``, there are corresponding functions in ``numpy.fft`` as shown below. .. note:: For the moment, APIs under ``KokkosFFT::Distributed`` and ``KokkosFFT::Testing`` are considered experimental and may be subject to changes without warnings. FFT Plan -------- .. toctree:: :maxdepth: 1 :hidden: api/plan/plan api/plan/execute .. list-table:: :widths: 50 25 25 :header-rows: 1 * - Description - ``Kokkos-FFT`` - ``numpy.fft`` * - A class that manages a FFT plan of backend FFT library - :doc:`api/plan/plan` - * - Execute FFT given by the Plan on input and output Views - :doc:`api/plan/execute` - Standard FFTs ------------- .. toctree:: :maxdepth: 1 :hidden: api/standard/fft api/standard/ifft api/standard/fft2 api/standard/ifft2 api/standard/fftn api/standard/ifftn .. list-table:: :widths: 50 25 25 :header-rows: 1 * - Description - ``Kokkos-FFT`` - ``numpy.fft`` * - One dimensional FFT in forward direction - :doc:`api/standard/fft` - `numpy.fft.fft `_ * - One dimensional FFT in backward direction - :doc:`api/standard/ifft` - `numpy.fft.ifft `_ * - Two dimensional FFT in forward direction - :doc:`api/standard/fft2` - `numpy.fft.fft2 `_ * - Two dimensional FFT in backward direction - :doc:`api/standard/ifft2` - `numpy.fft.ifft2 `_ * - N-dimensional FFT in forward direction - :doc:`api/standard/fftn` - `numpy.fft.fftn `_ * - N-dimensional FFT in backward direction - :doc:`api/standard/ifftn` - `numpy.fft.ifftn `_ Real FFTs --------- .. toctree:: :maxdepth: 1 :hidden: api/real/rfft api/real/irfft api/real/rfft2 api/real/irfft2 api/real/rfftn api/real/irfftn .. list-table:: :widths: 50 25 25 :header-rows: 1 * - Description - ``Kokkos-FFT`` - ``numpy.fft`` * - One dimensional FFT for real input - :doc:`api/real/rfft` - `numpy.fft.rfft `_ * - Inverse of :doc:`rfft` - :doc:`api/real/irfft` - `numpy.fft.irfft `_ * - Two dimensional FFT for real input - :doc:`api/real/rfft2` - `numpy.fft.rfft2 `_ * - Inverse of :doc:`rfft2` - :doc:`api/real/irfft2` - `numpy.fft.irfft2 `_ * - N-dimensional FFT for real input - :doc:`api/real/rfftn` - `numpy.fft.rfftn `_ * - Inverse of :doc:`rfftn` - :doc:`api/real/irfftn` - `numpy.fft.irfftn `_ Hermitian FFTs -------------- .. toctree:: :maxdepth: 1 :hidden: api/hermitian/hfft api/hermitian/ihfft .. list-table:: :widths: 50 25 25 :header-rows: 1 * - Description - ``Kokkos-FFT`` - ``numpy.fft`` * - One dimensional FFT of a signal that has Hermitian symmetry - :doc:`api/hermitian/hfft` - `numpy.fft.hfft `_ * - Inverse of :doc:`hfft` - :doc:`api/hermitian/ihfft` - `numpy.fft.ihfft `_ Helper routines --------------- .. toctree:: :maxdepth: 1 :hidden: api/helper/fftfreq api/helper/rfftfreq api/helper/fftshift api/helper/ifftshift .. list-table:: :widths: 50 25 25 :header-rows: 1 * - Description - ``Kokkos-FFT`` - ``numpy.fft`` * - Return the DFT sample frequencies - :doc:`api/helper/fftfreq` - `numpy.fft.fftfreq `_ * - Return the DFT sample frequencies for Real FFTs - :doc:`api/helper/rfftfreq` - `numpy.fft.rfftfreq `_ * - Shift the zero-frequency component to the center of the spectrum - :doc:`api/helper/fftshift` - `numpy.fft.fftshift `_ * - The inverse of :doc:`fftshift` - :doc:`api/helper/ifftshift` - `numpy.fft.ifftshift `_ Enums ----- .. toctree:: :maxdepth: 1 :hidden: api/enums/normalization api/enums/direction .. list-table:: :widths: 50 50 :header-rows: 1 * - Description - ``Kokkos-FFT`` * - Tag to specify when and how to normalize - :doc:`api/enums/normalization` * - Tag to specify FFT direction - :doc:`api/enums/direction` Macros ------ Following macros can be used to check whether a backend library is enabled or not. .. list-table:: :widths: 50 50 :header-rows: 1 * - Description - Macros * - Defined if the FFTW is enabled. - ``KOKKOSFFT_ENABLE_TPL_FFTW`` * - Defined if the cufft is enabled. - ``KOKKOSFFT_ENABLE_TPL_CUFFT`` * - Defined if the hipfft is enabled. - ``KOKKOSFFT_ENABLE_TPL_HIPFFT`` * - Defined if the rocfft is enabled. - ``KOKKOSFFT_ENABLE_TPL_ROCFFT`` * - Defined if the oneMKL is enabled. - ``KOKKOSFFT_ENABLE_TPL_ONEMKL``