|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
#include <fft_dsp.h>
Public Member Functions | |
| FFT_DSP () | |
| ~FFT_DSP () | |
| void | setupFFT () override |
| Setup the fft plan and data as pure virtual function. | |
| void | clear () override |
| Clear the fft data as pure virtual function. | |
| void | cleanFFT () override |
| Clean the fft plan as pure virtual function. | |
| void | resource_handler (const int flag) const override |
| Control the allocation or deallocation of hthread resource. | |
| virtual | __attribute__ ((weak)) void initfft(int nx_in |
| Initialize the fft parameters. | |
| void | initfft (int nx_in, int ny_in, int nz_in) |
| void | setupFFT () |
| Setup the fft plan and data as pure virtual function. | |
| void | resource_handler (const int flag) const |
| Allocate and destory the resoure in FFT running time, Now it only used in the DSP mode. | |
| void | fft3D_forward (std::complex< double > *in, std::complex< double > *out) const |
| void | fft3D_backward (std::complex< double > *in, std::complex< double > *out) const |
| void | cleanFFT () |
| Clean the fft plan as pure virtual function. | |
| void | clear () |
| Clear the fft data as pure virtual function. | |
| std::complex< double > * | get_auxr_3d_data () const |
| Get the auxiliary real space data in 3D. | |
| void | setupFFT () |
| Setup the fft plan and data as pure virtual function. | |
| void | clear () |
| Clear the fft data as pure virtual function. | |
| void | cleanFFT () |
| Clean the fft plan as pure virtual function. | |
| void | resource_handler (const int flag) const |
| Allocate and destory the resoure in FFT running time, Now it only used in the DSP mode. | |
| 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, int lixy_in, int rixy_in, int ns_in, int nplane_in, int nproc_in, bool gamma_only_in, bool xprime_in=true) |
| Initialize the fft parameters as virtual function. | |
| virtual ABACUS_FFT_WEAK FPTYPE * | get_rspace_data () const |
| Get the real space data in cpu-like fft. | |
| virtual ABACUS_FFT_WEAK std::complex< FPTYPE > * | get_auxr_data () const |
| virtual ABACUS_FFT_WEAK std::complex< FPTYPE > * | get_auxg_data () const |
| virtual ABACUS_FFT_WEAK void | fftxyfor (std::complex< FPTYPE > *in, std::complex< FPTYPE > *out) const |
| Forward FFT in x-y direction. | |
| virtual ABACUS_FFT_WEAK void | fftxybac (std::complex< FPTYPE > *in, std::complex< FPTYPE > *out) const |
| virtual ABACUS_FFT_WEAK void | fftzfor (std::complex< FPTYPE > *in, std::complex< FPTYPE > *out) const |
| Forward FFT in z direction. | |
| virtual ABACUS_FFT_WEAK void | fftzbac (std::complex< FPTYPE > *in, std::complex< FPTYPE > *out) const |
| virtual ABACUS_FFT_WEAK void | fftxyr2c (FPTYPE *in, std::complex< FPTYPE > *out) const |
| Forward FFT in x-y direction with real to complex. | |
| virtual ABACUS_FFT_WEAK void | fftxyc2r (std::complex< FPTYPE > *in, FPTYPE *out) const |
| 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 |
Public Attributes | |
| virtual int | ny_in |
| virtual int int nz_in | override |
| int | nxyz =0 |
| Get the real space data. | |
| INT | cluster_id =0 |
| INT | b_id =0 |
| INT | thread_id_for =0 |
| PLAN * | ptr_plan_forward =nullptr |
| PLAN * | ptr_plan_backward =nullptr |
| unsigned long | args_for [2] |
| unsigned long | args_back [2] |
| E * | forward_in =nullptr |
| std::complex< float > * | c_auxr_3d = nullptr |
| std::complex< double > * | z_auxr_3d = nullptr |
Additional Inherited Members | |
| Protected Attributes inherited from ModuleBase::FFT_BASE< FPTYPE > | |
| int | nx = 0 |
| int | ny = 0 |
| int | nz = 0 |
|
inline |
|
inline |
|
virtual |
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 |
|
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 >.
| void ModuleBase::FFT_DSP< double >::fft3D_backward | ( | std::complex< double > * | in, |
| std::complex< double > * | out ) const |
| void ModuleBase::FFT_DSP< double >::fft3D_forward | ( | std::complex< double > * | in, |
| std::complex< double > * | out ) const |
|
virtual |
Get the auxiliary real space data in 3D.
The function is used to get the auxiliary real space data in 3D. 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 |
Reimplemented from ModuleBase::FFT_BASE< FPTYPE >.
|
virtual |
Allocate and destory the resoure in FFT running time, Now it only used in the DSP mode.
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 allocate and destory the resoure in FFT running time.
Reimplemented from ModuleBase::FFT_BASE< FPTYPE >.
|
virtual |
Allocate and destory the resoure in FFT running time, Now it only used in the DSP mode.
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 allocate and destory the resoure in FFT running time.
Reimplemented from ModuleBase::FFT_BASE< FPTYPE >.
|
overridevirtual |
Control the allocation or deallocation of hthread resource.
| flag | 0: deallocate, 1: allocate |
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 >.
|
mutable |
|
mutable |
|
mutable |
| std::complex<float>* ModuleBase::FFT_DSP< FPTYPE >::c_auxr_3d = nullptr |
| INT ModuleBase::FFT_DSP< FPTYPE >::cluster_id =0 |
| E* ModuleBase::FFT_DSP< FPTYPE >::forward_in =nullptr |
| int ModuleBase::FFT_DSP< FPTYPE >::nxyz =0 |
Get the real space data.
Forward FFT in 3D
| in | input data, complex FPTYPE |
| out | output data, complex FPTYPE |
This function performs the forward FFT in 3D.
Backward FFT in 3D
| in | input data, complex FPTYPE |
| out | output data, complex FPTYPE |
This function performs the backward FFT in 3D.
| virtual int ModuleBase::FFT_DSP< FPTYPE >::ny_in |
| virtual int int nz_in ModuleBase::FFT_DSP< FPTYPE >::override |
| PLAN* ModuleBase::FFT_DSP< FPTYPE >::ptr_plan_backward =nullptr |
| PLAN* ModuleBase::FFT_DSP< FPTYPE >::ptr_plan_forward =nullptr |
|
mutable |
| std::complex<double>* ModuleBase::FFT_DSP< FPTYPE >::z_auxr_3d = nullptr |