|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
#include <fft_cpu.h>
Public Member Functions | |
| FFT_CPU () | |
| FFT_CPU (const int fft_mode_in) | |
| ~FFT_CPU () | |
| void | initfft (int nx_in, int ny_in, int nz_in, int lixy_in, int rixy_in, int ns_in, int nplane_in, int nproc_in, bool gamma_only_in, bool xprime_in=true) override |
| Initialize the fft parameters. | |
| ABACUS_FFT_WEAK void | setupFFT () override |
| Setup the fft plan and data as pure virtual function. | |
| ABACUS_FFT_WEAK void | cleanFFT () override |
| Clean the fft plan as pure virtual function. | |
| ABACUS_FFT_WEAK void | clear () override |
| Clear the fft data as pure virtual function. | |
| ABACUS_FFT_WEAK FPTYPE * | get_rspace_data () const override |
| Get the real space data the CPU FFT. | |
| ABACUS_FFT_WEAK std::complex< FPTYPE > * | get_auxr_data () const override |
| ABACUS_FFT_WEAK std::complex< FPTYPE > * | get_auxg_data () const override |
| ABACUS_FFT_WEAK void | fftxyfor (std::complex< FPTYPE > *in, std::complex< FPTYPE > *out) const override |
| Forward FFT in x-y direction. | |
| ABACUS_FFT_WEAK void | fftxybac (std::complex< FPTYPE > *in, std::complex< FPTYPE > *out) const override |
| ABACUS_FFT_WEAK void | fftzfor (std::complex< FPTYPE > *in, std::complex< FPTYPE > *out) const override |
| Forward FFT in z direction. | |
| ABACUS_FFT_WEAK void | fftzbac (std::complex< FPTYPE > *in, std::complex< FPTYPE > *out) const override |
| ABACUS_FFT_WEAK void | fftxyr2c (FPTYPE *in, std::complex< FPTYPE > *out) const override |
| Forward FFT in x-y direction with real to complex. | |
| ABACUS_FFT_WEAK void | fftxyc2r (std::complex< FPTYPE > *in, FPTYPE *out) const override |
| void | setupFFT () |
| Setup the fft plan and data as pure virtual function. | |
| void | cleanFFT () |
| Clean the fft plan as pure virtual function. | |
| void | clear () |
| Clear the fft data as pure virtual function. | |
| void | fftxyfor (std::complex< double > *in, std::complex< double > *out) const |
| void | fftxybac (std::complex< double > *in, std::complex< double > *out) const |
| void | fftzfor (std::complex< double > *in, std::complex< double > *out) const |
| void | fftzbac (std::complex< double > *in, std::complex< double > *out) const |
| void | fftxyr2c (double *in, std::complex< double > *out) const |
| void | fftxyc2r (std::complex< double > *in, double *out) const |
| double * | get_rspace_data () const |
| Get the real space data in cpu-like fft. | |
| std::complex< double > * | get_auxr_data () const |
| std::complex< double > * | get_auxg_data () const |
| void | setupFFT () |
| Setup the fft plan and data as pure virtual function. | |
| void | cleanFFT () |
| Clean the fft plan as pure virtual function. | |
| void | clear () |
| Clear the fft data as pure virtual function. | |
| void | fftxyfor (std::complex< float > *in, std::complex< float > *out) const |
| void | fftxybac (std::complex< float > *in, std::complex< float > *out) const |
| void | fftzfor (std::complex< float > *in, std::complex< float > *out) const |
| void | fftzbac (std::complex< float > *in, std::complex< float > *out) const |
| void | fftxyr2c (float *in, std::complex< float > *out) const |
| void | fftxyc2r (std::complex< float > *in, float *out) const |
| float * | get_rspace_data () const |
| Get the real space data in cpu-like fft. | |
| std::complex< float > * | get_auxr_data () const |
| std::complex< float > * | get_auxg_data () const |
| Public Member Functions inherited from ModuleBase::FFT_BASE< FPTYPE > | |
| FFT_BASE () | |
| virtual | ~FFT_BASE () |
| virtual ABACUS_FFT_WEAK void | initfft (int nx_in, int ny_in, int nz_in) |
| virtual void | resource_handler (const int flag) const |
| Allocate and destory the resoure in FFT running time, Now it only used in the DSP mode. | |
| virtual ABACUS_FFT_WEAK std::complex< FPTYPE > * | get_auxr_3d_data () const |
| Get the auxiliary real space data in 3D. | |
| virtual ABACUS_FFT_WEAK void | fft3D_forward (std::complex< FPTYPE > *in, std::complex< FPTYPE > *out) const |
| Forward FFT in 3D. | |
| virtual ABACUS_FFT_WEAK void | fft3D_backward (std::complex< FPTYPE > *in, std::complex< FPTYPE > *out) const |
Private Member Functions | |
| void | clearfft (fftw_plan &plan) |
| void | clearfft (fftwf_plan &plan) |
| void | clearfft (fftw_plan &plan) |
| void | clearfft (fftwf_plan &plan) |
Private Attributes | |
| fftw_plan | planzfor = NULL |
| fftw_plan | planzbac = NULL |
| fftw_plan | planxfor1 = NULL |
| fftw_plan | planxbac1 = NULL |
| fftw_plan | planxfor2 = NULL |
| fftw_plan | planxbac2 = NULL |
| fftw_plan | planyfor = NULL |
| fftw_plan | planybac = NULL |
| fftw_plan | planxr2c = NULL |
| fftw_plan | planxc2r = NULL |
| fftw_plan | planyr2c = NULL |
| fftw_plan | planyc2r = NULL |
| fftwf_plan | planfzfor = NULL |
| fftwf_plan | planfzbac = NULL |
| fftwf_plan | planfxfor1 = NULL |
| fftwf_plan | planfxbac1 = NULL |
| fftwf_plan | planfxfor2 = NULL |
| fftwf_plan | planfxbac2 = NULL |
| fftwf_plan | planfyfor = NULL |
| fftwf_plan | planfybac = NULL |
| fftwf_plan | planfxr2c = NULL |
| fftwf_plan | planfxc2r = NULL |
| fftwf_plan | planfyr2c = NULL |
| fftwf_plan | planfyc2r = NULL |
| std::complex< float > * | c_auxg = nullptr |
| std::complex< float > * | c_auxr = nullptr |
| std::complex< double > * | z_auxg = nullptr |
| std::complex< double > * | z_auxr = nullptr |
| float * | s_rspace = nullptr |
| double * | d_rspace = nullptr |
| int | fftnx =0 |
| int | fftny =0 |
| int | fftnxy =0 |
| int | nxy =0 |
| int | nplane =0 |
| int | ns =0 |
| int | nproc =1 |
| int | maxgrids = 0 |
| bool | gamma_only = false |
| int | lixy =0 |
| lixy: the left edge of the pw ball in the y direction | |
| int | rixy =0 |
| rixy: the right edge of the pw ball in the x or y direction | |
| bool | xprime = true |
| xprime: whether xprime is used,when do recip2real, x-fft will be done last and when doing real2recip, x-fft will be done first; false: y-fft For gamma_only, true: we use half x; false: we use half y | |
| int | fft_mode = 0 |
| fft_mode: fftw mode 0: estimate, 1: measure, 2: patient, 3: exhaustive | |
Additional Inherited Members | |
| Protected Attributes inherited from ModuleBase::FFT_BASE< FPTYPE > | |
| int | nx = 0 |
| int | ny = 0 |
| int | nz = 0 |
|
inline |
|
inline |
|
inline |
|
virtual |
Clean the fft plan as pure virtual function.
The function is set as pure virtual function.In order to override the function in the derived class.In the derived class, the function is used to clean the fft plan.
Implements ModuleBase::FFT_BASE< FPTYPE >.
|
virtual |
Clean the fft plan as pure virtual function.
The function is set as pure virtual function.In order to override the function in the derived class.In the derived class, the function is used to clean the fft plan.
Implements ModuleBase::FFT_BASE< FPTYPE >.
|
overridevirtual |
Clean the fft plan as pure virtual function.
The function is set as pure virtual function.In order to override the function in the derived class.In the derived class, the function is used to clean the fft plan.
Implements ModuleBase::FFT_BASE< FPTYPE >.
|
virtual |
Clear the fft data as pure virtual function.
The function is set as pure virtual function.In order to override the function in the derived class.In the derived class, the function is used to clear the fft data.
Implements ModuleBase::FFT_BASE< FPTYPE >.
|
virtual |
Clear the fft data as pure virtual function.
The function is set as pure virtual function.In order to override the function in the derived class.In the derived class, the function is used to clear the fft data.
Implements ModuleBase::FFT_BASE< FPTYPE >.
|
overridevirtual |
Clear the fft data as pure virtual function.
The function is set as pure virtual function.In order to override the function in the derived class.In the derived class, the function is used to clear the fft data.
Implements ModuleBase::FFT_BASE< FPTYPE >.
|
private |
|
private |
|
private |
|
private |
| void ModuleBase::FFT_CPU< double >::fftxybac | ( | std::complex< double > * | in, |
| std::complex< double > * | out ) const |
| void ModuleBase::FFT_CPU< float >::fftxybac | ( | std::complex< float > * | in, |
| std::complex< float > * | out ) const |
|
overridevirtual |
Reimplemented from ModuleBase::FFT_BASE< FPTYPE >.
| void ModuleBase::FFT_CPU< double >::fftxyc2r | ( | std::complex< double > * | in, |
| double * | out ) const |
| void ModuleBase::FFT_CPU< float >::fftxyc2r | ( | std::complex< float > * | in, |
| float * | out ) const |
|
overridevirtual |
Reimplemented from ModuleBase::FFT_BASE< FPTYPE >.
| void ModuleBase::FFT_CPU< double >::fftxyfor | ( | std::complex< double > * | in, |
| std::complex< double > * | out ) const |
| void ModuleBase::FFT_CPU< float >::fftxyfor | ( | std::complex< float > * | in, |
| std::complex< float > * | out ) const |
|
overridevirtual |
Forward FFT in x-y direction.
| in | input data |
| out | output data |
The function details can be found in FFT_BASE, and the function interfaces can be found in FFT_BUNDLE.
Reimplemented from ModuleBase::FFT_BASE< FPTYPE >.
| void ModuleBase::FFT_CPU< double >::fftxyr2c | ( | double * | in, |
| std::complex< double > * | out ) const |
| void ModuleBase::FFT_CPU< float >::fftxyr2c | ( | float * | in, |
| std::complex< float > * | out ) const |
|
overridevirtual |
Forward FFT in x-y direction with real to complex.
| in | input data, real type |
| out | output data, complex type |
This function performs the forward FFT in the x-y direction with real to complex.There is no difference between fftxyfor.
Reimplemented from ModuleBase::FFT_BASE< FPTYPE >.
| void ModuleBase::FFT_CPU< double >::fftzbac | ( | std::complex< double > * | in, |
| std::complex< double > * | out ) const |
| void ModuleBase::FFT_CPU< float >::fftzbac | ( | std::complex< float > * | in, |
| std::complex< float > * | out ) const |
|
overridevirtual |
Reimplemented from ModuleBase::FFT_BASE< FPTYPE >.
| void ModuleBase::FFT_CPU< double >::fftzfor | ( | std::complex< double > * | in, |
| std::complex< double > * | out ) const |
| void ModuleBase::FFT_CPU< float >::fftzfor | ( | std::complex< float > * | in, |
| std::complex< float > * | out ) const |
|
overridevirtual |
Forward FFT in z direction.
| in | input data |
| out | output data |
This function performs the forward FFT in the z direction. It involves only one axis, z. The FFT is applied only once. Notably, the Z axis operates in many FFT with nz*ns.
Reimplemented from ModuleBase::FFT_BASE< FPTYPE >.
|
virtual |
Reimplemented from ModuleBase::FFT_BASE< FPTYPE >.
|
virtual |
Reimplemented from ModuleBase::FFT_BASE< FPTYPE >.
|
overridevirtual |
Reimplemented from ModuleBase::FFT_BASE< FPTYPE >.
|
virtual |
Reimplemented from ModuleBase::FFT_BASE< FPTYPE >.
|
virtual |
Reimplemented from ModuleBase::FFT_BASE< FPTYPE >.
|
overridevirtual |
Reimplemented from ModuleBase::FFT_BASE< FPTYPE >.
|
virtual |
Get the real space data in cpu-like fft.
The function is used to get the real space data.While the FFT_BASE is an abstract class,the function will be override, The attribute weak is used to avoid define the function.
Reimplemented from ModuleBase::FFT_BASE< FPTYPE >.
|
virtual |
Get the real space data in cpu-like fft.
The function is used to get the real space data.While the FFT_BASE is an abstract class,the function will be override, The attribute weak is used to avoid define the function.
Reimplemented from ModuleBase::FFT_BASE< FPTYPE >.
|
overridevirtual |
Get the real space data the CPU FFT.
the function will return the real space data, which is used in the CPU fft.Use the weak attribute to avoid defining float while without flag ENABLE_FLOAT_FFTW.
Reimplemented from ModuleBase::FFT_BASE< FPTYPE >.
|
overridevirtual |
Initialize the fft parameters.
| nx_in | number of grid points in x direction. |
| ny_in | number of grid points in y direction. |
| nz_in | number of grid points in z direction. |
| lixy_in | the position of the left boundary in the x-y plane. |
| rixy_in | the position of the right boundary in the x-y plane. |
| ns_in | number of stick whcih is used in the Z direction. |
| nplane_in | number of x-y planes. |
| nproc_in | number of processors. |
| gamma_only_in | whether only gamma point is used. |
| xprime_in | whether xprime is used. |
Reimplemented from ModuleBase::FFT_BASE< FPTYPE >.
|
virtual |
Setup the fft plan and data as pure virtual function.
The function is set as pure virtual function.In order to override the function in the derived class.In the derived class, the function is used to setup the fft plan and data.
Implements ModuleBase::FFT_BASE< FPTYPE >.
|
virtual |
Setup the fft plan and data as pure virtual function.
The function is set as pure virtual function.In order to override the function in the derived class.In the derived class, the function is used to setup the fft plan and data.
Implements ModuleBase::FFT_BASE< FPTYPE >.
|
overridevirtual |
Setup the fft plan and data as pure virtual function.
The function is set as pure virtual function.In order to override the function in the derived class.In the derived class, the function is used to setup the fft plan and data.
Implements ModuleBase::FFT_BASE< FPTYPE >.
|
private |
|
private |
|
private |
|
private |
fft_mode: fftw mode 0: estimate, 1: measure, 2: patient, 3: exhaustive
|
private |
|
private |
|
private |
|
private |
|
private |
lixy: the left edge of the pw ball in the y direction
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
rixy: the right edge of the pw ball in the x or y direction
|
private |
|
private |
xprime: whether xprime is used,when do recip2real, x-fft will be done last and when doing real2recip, x-fft will be done first; false: y-fft For gamma_only, true: we use half x; false: we use half y
|
private |
|
private |