![]() |
(git:e70887f)
|
#include "fft_lib_fftw.h"#include "fft_key.h"#include "fft_timer.h"#include "fft_utils.h"#include "../base/cp_assert.h"#include <math.h>#include <omp.h>#include <stdbool.h>#include <stddef.h>#include <stdlib.h>#include <string.h>Go to the source code of this file.
Functions | |
| int | fft_fftw_init_lib (const fftw_plan_type fftw_planning_flag, const bool use_guru_interface, const char *wisdom_file) |
| Initialize the FFT library (if not done externally). | |
| void | fft_fftw_finalize_lib (const char *wisdom_file) |
| Finalize the FFT library (if not done externally). | |
| bool | fft_fftw_lib_has_guru_interface () |
| Whether a distributed FFT implementation is available. | |
| void | fft_fftw_allocate_double (const int length, double **buffer) |
| Allocate buffer of type double. | |
| void | fft_fftw_allocate_complex (const int length, double complex **buffer) |
| Allocate buffer of type double complex. | |
| void | fft_fftw_free_double (double *buffer) |
| Free buffer of type double. | |
| void | fft_fftw_free_complex (double complex *buffer) |
| Free buffer of type double complex. | |
| void | fft_fftw_register_1d_local (const bool direction, const int fft_size, const int number_of_ffts, const bool transpose_in, const bool transpose_out, const int leading_dimension_in, const int leading_dimension_out, double complex *grid_in, double complex *grid_out) |
| Performs a local C2C 1D FFT. | |
| void | fft_fftw_register_1d_r2c_local (const int fft_size, const int number_of_ffts, const bool transpose_in, const bool transpose_out, const int leading_dimension_in, const int leading_dimension_out, double *grid_in, double complex *grid_out) |
| Performs a local forward R2C FFT. | |
| void | fft_fftw_register_1d_c2r_local (const int fft_size, const int number_of_ffts, const bool transpose_in, const bool transpose_out, const int leading_dimension_in, const int leading_dimension_out, double complex *grid_in, double *grid_out) |
| Performs a local backwards C2R 1D FFT. | |
| void | fft_fftw_register_2d_local (const bool direction, const int fft_size[2], const int number_of_ffts, const bool transpose_in, const bool transpose_out, double complex *grid_in, double complex *grid_out) |
| Performs a local C2C 2D FFT. | |
| void | fft_fftw_register_2d_r2c_local (const int fft_size[2], const int number_of_ffts, const bool transpose_in, const bool transpose_out, double *grid_in, double complex *grid_out) |
| Performs a local forward R2C 2D FFT. | |
| void | fft_fftw_register_2d_c2r_local (const int fft_size[2], const int number_of_ffts, const bool transpose_in, const bool transpose_out, double complex *grid_in, double *grid_out) |
| Performs a local backwards C2R 2D FFT. | |
| void | fft_fftw_register_3d_local (const bool direction, const int fft_size[3], const int number_of_ffts, const bool transpose_in, const bool transpose_out, double complex *grid_in, double complex *grid_out) |
| Performs a local C2C 3D FFT. | |
| void | fft_fftw_register_3d_r2c_local (const int fft_size[3], const int number_of_ffts, const bool transpose_in, const bool transpose_out, double *grid_in, double complex *grid_out) |
| Performs a local forward R2C 3D FFT. | |
| void | fft_fftw_register_3d_c2r_local (const int fft_size[3], const int number_of_ffts, const bool transpose_in, const bool transpose_out, double complex *grid_in, double *grid_out) |
| Performs a local backwards R2C 3D FFT. | |
| void | fft_fftw_1d_local (const bool direction, const int fft_size, const int number_of_ffts, const bool transpose_in, const bool transpose_out, const int leading_dimension_in, const int leading_dimension_out, double complex *grid_in, double complex *grid_out) |
| Performs a local forward C2C 1D FFT. | |
| void | fft_fftw_1d_r2c_local (const int fft_size, const int number_of_ffts, const bool transpose_in, const bool transpose_out, const int leading_dimension_in, const int leading_dimension_out, double *grid_in, double complex *grid_out) |
| Performs a local forward R2C FFT. | |
| void | fft_fftw_1d_c2r_local (const int fft_size, const int number_of_ffts, const bool transpose_in, const bool transpose_out, const int leading_dimension_in, const int leading_dimension_out, double complex *grid_in, double *grid_out) |
| Performs a local backwards C2R 1D FFT. | |
| void | fft_fftw_2d_local (const bool direction, const int fft_size[2], const int number_of_ffts, const bool transpose_in, const bool transpose_out, double complex *grid_in, double complex *grid_out) |
| Performs a local C2C 2D FFT. | |
| void | fft_fftw_2d_r2c_local (const int fft_size[2], const int number_of_ffts, const bool transpose_in, const bool transpose_out, double *grid_in, double complex *grid_out) |
| Performs a local forward R2C 2D FFT. | |
| void | fft_fftw_2d_c2r_local (const int fft_size[2], const int number_of_ffts, const bool transpose_in, const bool transpose_out, double complex *grid_in, double *grid_out) |
| Performs a local backwards C2R 2D FFT. | |
| void | fft_fftw_3d_local (const bool direction, const int fft_size[3], const int number_of_ffts, const bool transpose_in, const bool transpose_out, double complex *grid_in, double complex *grid_out) |
| Performs a local C2C 3D FFT. | |
| void | fft_fftw_3d_r2c_local (const int fft_size[3], const int number_of_ffts, const bool transpose_in, const bool transpose_out, double *grid_in, double complex *grid_out) |
| Performs a local forward R2C 3D FFT. | |
| void | fft_fftw_3d_c2r_local (const int fft_size[3], const int number_of_ffts, const bool transpose_in, const bool transpose_out, double complex *grid_in, double *grid_out) |
| Performs a local backwards R2C 3D FFT. | |
Variables | |
| static bool | has_guru_interface = false |
| int fft_fftw_init_lib | ( | const fftw_plan_type | fftw_planning_flag, |
| const bool | use_guru_interface, | ||
| const char * | wisdom_file ) |
Initialize the FFT library (if not done externally).
\brief Initialize the FFT library (if not done externally).
| fftw_planning_flag | FFTW planning mode. |
| use_guru_interface | Whether the FFTW Guru interface may be used. |
| wisdom_file | Path to the FFTW wisdom file. |
Definition at line 787 of file fft_lib_fftw.c.
| void fft_fftw_finalize_lib | ( | const char * | wisdom_file | ) |
Finalize the FFT library (if not done externally).
| wisdom_file | Path to the FFTW wisdom file. |
Definition at line 856 of file fft_lib_fftw.c.
| bool fft_fftw_lib_has_guru_interface | ( | ) |
Whether a distributed FFT implementation is available.
Whether the guru interface is available.
Definition at line 898 of file fft_lib_fftw.c.
| void fft_fftw_allocate_double | ( | const int | length, |
| double ** | buffer ) |
Allocate buffer of type double.
| length | Number of elements. |
| buffer | Buffer pointer. |
Definition at line 906 of file fft_lib_fftw.c.
| void fft_fftw_allocate_complex | ( | const int | length, |
| double complex ** | buffer ) |
Allocate buffer of type double complex.
| length | Number of elements. |
| buffer | Buffer pointer. |
Definition at line 925 of file fft_lib_fftw.c.
| void fft_fftw_free_double | ( | double * | buffer | ) |
Free buffer of type double.
| buffer | Buffer pointer. |
Definition at line 943 of file fft_lib_fftw.c.
| void fft_fftw_free_complex | ( | double complex * | buffer | ) |
Free buffer of type double complex.
| buffer | Buffer pointer. |
Definition at line 958 of file fft_lib_fftw.c.
| void fft_fftw_register_1d_local | ( | const bool | direction, |
| const int | fft_size, | ||
| const int | number_of_ffts, | ||
| const bool | transpose_in, | ||
| const bool | transpose_out, | ||
| const int | leading_dimension_in, | ||
| const int | leading_dimension_out, | ||
| double complex * | grid_in, | ||
| double complex * | grid_out ) |
Performs a local C2C 1D FFT.
| direction | FFT direction (forward or backward). |
| fft_size | Size of the transform in each dimension. |
| number_of_ffts | Number of independent (batched) transforms. |
| transpose_in | Whether the input array uses the transposed layout. |
| transpose_out | Whether the output array uses the transposed layout. |
| leading_dimension_in | Leading dimension of the input array. |
| leading_dimension_out | Leading dimension of the output array. |
| grid_in | Input grid buffer. |
| grid_out | Output grid buffer. |
Definition at line 1355 of file fft_lib_fftw.c.
| void fft_fftw_register_1d_r2c_local | ( | const int | fft_size, |
| const int | number_of_ffts, | ||
| const bool | transpose_in, | ||
| const bool | transpose_out, | ||
| const int | leading_dimension_in, | ||
| const int | leading_dimension_out, | ||
| double * | grid_in, | ||
| double complex * | grid_out ) |
Performs a local forward R2C FFT.
| fft_size | Size of the transform in each dimension. |
| number_of_ffts | Number of independent (batched) transforms. |
| transpose_in | Whether the input array uses the transposed layout. |
| transpose_out | Whether the output array uses the transposed layout. |
| leading_dimension_in | Leading dimension of the input array. |
| leading_dimension_out | Leading dimension of the output array. |
| grid_in | Input grid buffer. |
| grid_out | Output grid buffer. |
Definition at line 1422 of file fft_lib_fftw.c.
| void fft_fftw_register_1d_c2r_local | ( | const int | fft_size, |
| const int | number_of_ffts, | ||
| const bool | transpose_in, | ||
| const bool | transpose_out, | ||
| const int | leading_dimension_in, | ||
| const int | leading_dimension_out, | ||
| double complex * | grid_in, | ||
| double * | grid_out ) |
Performs a local backwards C2R 1D FFT.
| fft_size | Size of the transform in each dimension. |
| number_of_ffts | Number of independent (batched) transforms. |
| transpose_in | Whether the input array uses the transposed layout. |
| transpose_out | Whether the output array uses the transposed layout. |
| leading_dimension_in | Leading dimension of the input array. |
| leading_dimension_out | Leading dimension of the output array. |
| grid_in | Input grid buffer. |
| grid_out | Output grid buffer. |
Definition at line 1496 of file fft_lib_fftw.c.
| void fft_fftw_register_2d_local | ( | const bool | direction, |
| const int | fft_size[2], | ||
| const int | number_of_ffts, | ||
| const bool | transpose_in, | ||
| const bool | transpose_out, | ||
| double complex * | grid_in, | ||
| double complex * | grid_out ) |
Performs a local C2C 2D FFT.
| direction | FFT direction (forward or backward). |
| fft_size | Size of the transform in each dimension. |
| number_of_ffts | Number of independent (batched) transforms. |
| transpose_in | Whether the input array uses the transposed layout. |
| transpose_out | Whether the output array uses the transposed layout. |
| grid_in | Input grid buffer. |
| grid_out | Output grid buffer. |
Definition at line 1569 of file fft_lib_fftw.c.
| void fft_fftw_register_2d_r2c_local | ( | const int | fft_size[2], |
| const int | number_of_ffts, | ||
| const bool | transpose_in, | ||
| const bool | transpose_out, | ||
| double * | grid_in, | ||
| double complex * | grid_out ) |
Performs a local forward R2C 2D FFT.
| fft_size | Size of the transform in each dimension. |
| number_of_ffts | Number of independent (batched) transforms. |
| transpose_in | Whether the input array uses the transposed layout. |
| transpose_out | Whether the output array uses the transposed layout. |
| grid_in | Input grid buffer. |
| grid_out | Output grid buffer. |
Definition at line 1641 of file fft_lib_fftw.c.
| void fft_fftw_register_2d_c2r_local | ( | const int | fft_size[2], |
| const int | number_of_ffts, | ||
| const bool | transpose_in, | ||
| const bool | transpose_out, | ||
| double complex * | grid_in, | ||
| double * | grid_out ) |
Performs a local backwards C2R 2D FFT.
| fft_size | Size of the transform in each dimension. |
| number_of_ffts | Number of independent (batched) transforms. |
| transpose_in | Whether the input array uses the transposed layout. |
| transpose_out | Whether the output array uses the transposed layout. |
| grid_in | Input grid buffer. |
| grid_out | Output grid buffer. |
Definition at line 1722 of file fft_lib_fftw.c.
| void fft_fftw_register_3d_local | ( | const bool | direction, |
| const int | fft_size[3], | ||
| const int | number_of_ffts, | ||
| const bool | transpose_in, | ||
| const bool | transpose_out, | ||
| double complex * | grid_in, | ||
| double complex * | grid_out ) |
Performs a local C2C 3D FFT.
| direction | FFT direction (forward or backward). |
| fft_size | Size of the transform in each dimension. |
| number_of_ffts | Number of independent (batched) transforms. |
| transpose_in | Whether the input array uses the transposed layout. |
| transpose_out | Whether the output array uses the transposed layout. |
| grid_in | Input grid buffer. |
| grid_out | Output grid buffer. |
Definition at line 1804 of file fft_lib_fftw.c.
| void fft_fftw_register_3d_r2c_local | ( | const int | fft_size[3], |
| const int | number_of_ffts, | ||
| const bool | transpose_in, | ||
| const bool | transpose_out, | ||
| double * | grid_in, | ||
| double complex * | grid_out ) |
Performs a local forward R2C 3D FFT.
| fft_size | Size of the transform in each dimension. |
| number_of_ffts | Number of independent (batched) transforms. |
| transpose_in | Whether the input array uses the transposed layout. |
| transpose_out | Whether the output array uses the transposed layout. |
| grid_in | Input grid buffer. |
| grid_out | Output grid buffer. |
Definition at line 1854 of file fft_lib_fftw.c.
| void fft_fftw_register_3d_c2r_local | ( | const int | fft_size[3], |
| const int | number_of_ffts, | ||
| const bool | transpose_in, | ||
| const bool | transpose_out, | ||
| double complex * | grid_in, | ||
| double * | grid_out ) |
Performs a local backwards R2C 3D FFT.
| fft_size | Size of the transform in each dimension. |
| number_of_ffts | Number of independent (batched) transforms. |
| transpose_in | Whether the input array uses the transposed layout. |
| transpose_out | Whether the output array uses the transposed layout. |
| grid_in | Input grid buffer. |
| grid_out | Output grid buffer. |
Definition at line 1902 of file fft_lib_fftw.c.
| void fft_fftw_1d_local | ( | const bool | direction, |
| const int | fft_size, | ||
| const int | number_of_ffts, | ||
| const bool | transpose_in, | ||
| const bool | transpose_out, | ||
| const int | leading_dimension_in, | ||
| const int | leading_dimension_out, | ||
| double complex * | grid_in, | ||
| double complex * | grid_out ) |
Performs a local forward C2C 1D FFT.
| direction | FFT direction (forward or backward). |
| fft_size | Size of the transform in each dimension. |
| number_of_ffts | Number of independent (batched) transforms. |
| transpose_in | Whether the input array uses the transposed layout. |
| transpose_out | Whether the output array uses the transposed layout. |
| leading_dimension_in | Leading dimension of the input array. |
| leading_dimension_out | Leading dimension of the output array. |
| grid_in | Input grid buffer. |
| grid_out | Output grid buffer. |
Definition at line 1953 of file fft_lib_fftw.c.
| void fft_fftw_1d_r2c_local | ( | const int | fft_size, |
| const int | number_of_ffts, | ||
| const bool | transpose_in, | ||
| const bool | transpose_out, | ||
| const int | leading_dimension_in, | ||
| const int | leading_dimension_out, | ||
| double * | grid_in, | ||
| double complex * | grid_out ) |
Performs a local forward R2C FFT.
| fft_size | Size of the transform in each dimension. |
| number_of_ffts | Number of independent (batched) transforms. |
| transpose_in | Whether the input array uses the transposed layout. |
| transpose_out | Whether the output array uses the transposed layout. |
| leading_dimension_in | Leading dimension of the input array. |
| leading_dimension_out | Leading dimension of the output array. |
| grid_in | Input grid buffer. |
| grid_out | Output grid buffer. |
Definition at line 2054 of file fft_lib_fftw.c.
| void fft_fftw_1d_c2r_local | ( | const int | fft_size, |
| const int | number_of_ffts, | ||
| const bool | transpose_in, | ||
| const bool | transpose_out, | ||
| const int | leading_dimension_in, | ||
| const int | leading_dimension_out, | ||
| double complex * | grid_in, | ||
| double * | grid_out ) |
Performs a local backwards C2R 1D FFT.
| fft_size | Size of the transform in each dimension. |
| number_of_ffts | Number of independent (batched) transforms. |
| transpose_in | Whether the input array uses the transposed layout. |
| transpose_out | Whether the output array uses the transposed layout. |
| leading_dimension_in | Leading dimension of the input array. |
| leading_dimension_out | Leading dimension of the output array. |
| grid_in | Input grid buffer. |
| grid_out | Output grid buffer. |
Definition at line 2156 of file fft_lib_fftw.c.
| void fft_fftw_2d_local | ( | const bool | direction, |
| const int | fft_size[2], | ||
| const int | number_of_ffts, | ||
| const bool | transpose_in, | ||
| const bool | transpose_out, | ||
| double complex * | grid_in, | ||
| double complex * | grid_out ) |
Performs a local C2C 2D FFT.
| direction | FFT direction (forward or backward). |
| fft_size | Size of the transform in each dimension. |
| number_of_ffts | Number of independent (batched) transforms. |
| transpose_in | Whether the input array uses the transposed layout. |
| transpose_out | Whether the output array uses the transposed layout. |
| grid_in | Input grid buffer. |
| grid_out | Output grid buffer. |
Definition at line 2257 of file fft_lib_fftw.c.
| void fft_fftw_2d_r2c_local | ( | const int | fft_size[2], |
| const int | number_of_ffts, | ||
| const bool | transpose_in, | ||
| const bool | transpose_out, | ||
| double * | grid_in, | ||
| double complex * | grid_out ) |
Performs a local forward R2C 2D FFT.
| fft_size | Size of the transform in each dimension. |
| number_of_ffts | Number of independent (batched) transforms. |
| transpose_in | Whether the input array uses the transposed layout. |
| transpose_out | Whether the output array uses the transposed layout. |
| grid_in | Input grid buffer. |
| grid_out | Output grid buffer. |
Definition at line 2358 of file fft_lib_fftw.c.
| void fft_fftw_2d_c2r_local | ( | const int | fft_size[2], |
| const int | number_of_ffts, | ||
| const bool | transpose_in, | ||
| const bool | transpose_out, | ||
| double complex * | grid_in, | ||
| double * | grid_out ) |
Performs a local backwards C2R 2D FFT.
| fft_size | Size of the transform in each dimension. |
| number_of_ffts | Number of independent (batched) transforms. |
| transpose_in | Whether the input array uses the transposed layout. |
| transpose_out | Whether the output array uses the transposed layout. |
| grid_in | Input grid buffer. |
| grid_out | Output grid buffer. |
Definition at line 2469 of file fft_lib_fftw.c.
| void fft_fftw_3d_local | ( | const bool | direction, |
| const int | fft_size[3], | ||
| const int | number_of_ffts, | ||
| const bool | transpose_in, | ||
| const bool | transpose_out, | ||
| double complex * | grid_in, | ||
| double complex * | grid_out ) |
Performs a local C2C 3D FFT.
| direction | FFT direction (forward or backward). |
| fft_size | Size of the transform in each dimension. |
| number_of_ffts | Number of independent (batched) transforms. |
| transpose_in | Whether the input array uses the transposed layout. |
| transpose_out | Whether the output array uses the transposed layout. |
| grid_in | Input grid buffer. |
| grid_out | Output grid buffer. |
Definition at line 2583 of file fft_lib_fftw.c.
| void fft_fftw_3d_r2c_local | ( | const int | fft_size[3], |
| const int | number_of_ffts, | ||
| const bool | transpose_in, | ||
| const bool | transpose_out, | ||
| double * | grid_in, | ||
| double complex * | grid_out ) |
Performs a local forward R2C 3D FFT.
| fft_size | Size of the transform in each dimension. |
| number_of_ffts | Number of independent (batched) transforms. |
| transpose_in | Whether the input array uses the transposed layout. |
| transpose_out | Whether the output array uses the transposed layout. |
| grid_in | Input grid buffer. |
| grid_out | Output grid buffer. |
Definition at line 2638 of file fft_lib_fftw.c.
| void fft_fftw_3d_c2r_local | ( | const int | fft_size[3], |
| const int | number_of_ffts, | ||
| const bool | transpose_in, | ||
| const bool | transpose_out, | ||
| double complex * | grid_in, | ||
| double * | grid_out ) |
Performs a local backwards R2C 3D FFT.
| fft_size | Size of the transform in each dimension. |
| number_of_ffts | Number of independent (batched) transforms. |
| transpose_in | Whether the input array uses the transposed layout. |
| transpose_out | Whether the output array uses the transposed layout. |
| grid_in | Input grid buffer. |
| grid_out | Output grid buffer. |
Definition at line 2691 of file fft_lib_fftw.c.
|
static |
Definition at line 131 of file fft_lib_fftw.c.