Rate This Document
Findability
Accuracy
Completeness
Readability

Function Description

KML_FFT is a math library of fast Fourier transform (FFT). It is an efficient method to compute the discrete Fourier transform (DFT) or its inverse, and is widely used in the fields of engineering, science, and mathematics. KML_FFT reduces the computational complexity of the Fourier transform from O(n2) to O(n log n), and is listed among the top 10 algorithms of the 20th century by the IEEE Computing in Science & Engineering.

The Fast Fourier Transform (FFT) library contains a series of interface standards for FFT functions. The KML_FFT library contains the following six types of functions:

  • Plan functions: used to create a plan for an FFT. After a plan is used, call kml_fft(f/h)_destroy_plan to release it.
  • Transform execution functions: used to execute an FFT based on the plan.
  • Memory functions: used to allocate and release a memory space.
  • Thread functions: used to initialize a thread and release related resources.
  • MPI Local Size: used to divide data among processes.
  • MPI transposition: used to perform transposition.

For the previous transforms, the KML_FFT library supports:

  • In-place transform (the input and output have the same pointer) and out-place transform.
  • Single precision and double precision: Single-precision functions use kml_fftf_ as the function prefix, and double-precision functions use kml_fft_ as the function prefix. Single-Process Function Syntax and Multi-Process Function Syntax provide examples of double-precision functions.
  • Planning option: For a plan function, the flags parameter can be set to the ESTIMATE or PATIENT mode.
    • ESTIMATE mode: Different algorithms are not calculated or evaluated. A transformation scheme is quickly selected, which may not be the optimal one.
    • PATIENT mode: Multiple transformation schemes are calculated and evaluated, and their execution time is measured to obtain an optimal transformation scheme at the expense of increased latency in the planning function.

The following interfaces apply only to TaiShan 200 1280 V2 and TaiShan 200 2280 V2 servers.

  • C interfaces: interfaces starting with "kml_ffth"
  • Fortran interfaces: interfaces starting with "RES = KML_FFTH"