|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
#include <fft_base.h>
Public Member Functions | |
| FFT_BASE () | |
| virtual | ~FFT_BASE () |
| virtual | __attribute__ ((weak)) void initfft(int nx_in |
| Initialize the fft parameters as virtual function. | |
| virtual | __attribute__ ((weak)) void initfft(int nx_in |
| virtual void | setupFFT ()=0 |
| Setup the fft plan and data as pure virtual function. | |
| virtual void | cleanFFT ()=0 |
| Clean the fft plan as pure virtual function. | |
| virtual void | clear ()=0 |
| Clear the fft data as pure virtual function. | |
| 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 | __attribute__ ((weak)) FPTYPE *get_rspace_data() const |
| Get the real space data in cpu-like fft. | |
| virtual virtual __attribute__((weak)) std virtual __attribute__((weak)) std virtual __attribute__((weak)) std virtual __attribute__((weak)) void fftxyfor(std virtual __attribute__((weak)) void fftxybac(std virtual __attribute__((weak)) void fftzfor(std virtual __attribute__((weak)) void fftzbac(std | __attribute__ ((weak)) void fftxyr2c(FPTYPE *in |
| Get the auxiliary real space data in 3D. | |
Public Attributes | |
| virtual int | ny_in |
| virtual int int | nz_in |
| virtual int int int | lixy_in |
| virtual int int int int | rixy_in |
| virtual int int int int int | ns_in |
| virtual int int int int int int | nplane_in |
| virtual int int int int int int int | nproc_in |
| virtual int int int int int int int bool | gamma_only_in |
| virtual int int int int int int int bool bool | xprime_in = true) |
| virtual virtual __attribute__((weak)) std virtual __attribute__((weak)) std virtual __attribute__((weak)) std virtual __attribute__((weak)) void fftxyfor(std virtual __attribute__((weak)) void fftxybac(std virtual __attribute__((weak)) void fftzfor(std virtual __attribute__((weak)) void fftzbac(std std::complex< FPTYPE > *out | const |
Protected Attributes | |
| int | nx = 0 |
| Forward FFT in 3D. | |
| int | ny = 0 |
| int | nz = 0 |
|
inline |
|
inlinevirtual |
|
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 in ModuleBase::FFT_CPU< FPTYPE >.
|
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.
Forward FFT in x-y direction
| in | input data |
| out | output data |
This function performs the forward FFT in the x-y direction. It involves two axes, x and y. The FFT is applied multiple times along the left and right boundaries in the primary direction(which is determined by the xprime flag).Notably, the Y axis operates in "many-many-FFT" mode.
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.
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 in ModuleBase::FFT_CPU< FPTYPE >, ModuleBase::FFT_CPU< FPTYPE >, ModuleBase::FFT_CPU< FPTYPE >, ModuleBase::FFT_DSP< FPTYPE >, and ModuleBase::FFT_CPU< FPTYPE >.
|
virtual |
Initialize the fft parameters as virtual function.
The function is used to initialize the fft parameters.
Reimplemented in ModuleBase::FFT_CPU< FPTYPE >, ModuleBase::FFT_CPU< FPTYPE >, ModuleBase::FFT_CPU< FPTYPE >, ModuleBase::FFT_DSP< FPTYPE >, and ModuleBase::FFT_CPU< FPTYPE >.
|
virtual |
|
pure 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.
Implemented in ModuleBase::FFT_CPU< FPTYPE >, ModuleBase::FFT_CPU< FPTYPE >, ModuleBase::FFT_CUDA< FPTYPE >, ModuleBase::FFT_CUDA< FPTYPE >, ModuleBase::FFT_DSP< FPTYPE >, ModuleBase::FFT_DSP< FPTYPE >, ModuleBase::FFT_ROCM< FPTYPE >, ModuleBase::FFT_ROCM< FPTYPE >, ModuleBase::FFT_CUDA< FPTYPE >, ModuleBase::FFT_DSP< FPTYPE >, and ModuleBase::FFT_ROCM< FPTYPE >.
|
pure 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.
Implemented in ModuleBase::FFT_CPU< FPTYPE >, ModuleBase::FFT_CPU< FPTYPE >, ModuleBase::FFT_CUDA< FPTYPE >, ModuleBase::FFT_CUDA< FPTYPE >, ModuleBase::FFT_DSP< FPTYPE >, ModuleBase::FFT_DSP< FPTYPE >, ModuleBase::FFT_ROCM< FPTYPE >, ModuleBase::FFT_ROCM< FPTYPE >, ModuleBase::FFT_CUDA< FPTYPE >, ModuleBase::FFT_DSP< FPTYPE >, and ModuleBase::FFT_ROCM< FPTYPE >.
|
inlinevirtual |
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 in ModuleBase::FFT_DSP< FPTYPE >, ModuleBase::FFT_DSP< FPTYPE >, and ModuleBase::FFT_DSP< FPTYPE >.
|
pure 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.
Implemented in ModuleBase::FFT_CPU< FPTYPE >, ModuleBase::FFT_CPU< FPTYPE >, ModuleBase::FFT_CUDA< FPTYPE >, ModuleBase::FFT_CUDA< FPTYPE >, ModuleBase::FFT_DSP< FPTYPE >, ModuleBase::FFT_DSP< FPTYPE >, ModuleBase::FFT_ROCM< FPTYPE >, ModuleBase::FFT_ROCM< FPTYPE >, ModuleBase::FFT_CUDA< FPTYPE >, ModuleBase::FFT_DSP< FPTYPE >, and ModuleBase::FFT_ROCM< FPTYPE >.
| virtual virtual __attribute__((weak)) std virtual __attribute__((weak)) std virtual __attribute__((weak)) std virtual __attribute__((weak)) void fftxyfor(std virtual __attribute__((weak)) void fftxybac(std virtual __attribute__((weak)) void fftzfor(std virtual __attribute__((weak)) void fftzbac(std std::complex<FPTYPE>* out ModuleBase::FFT_BASE< FPTYPE >::const |
| virtual int int int int int int int bool ModuleBase::FFT_BASE< FPTYPE >::gamma_only_in |
| virtual int int int ModuleBase::FFT_BASE< FPTYPE >::lixy_in |
| virtual int int int int int int ModuleBase::FFT_BASE< FPTYPE >::nplane_in |
| virtual int int int int int int int ModuleBase::FFT_BASE< FPTYPE >::nproc_in |
| virtual int int int int int ModuleBase::FFT_BASE< FPTYPE >::ns_in |
|
protected |
Forward FFT in 3D.
| in | input data |
| out | output data |
This function performs the forward FFT for gpu-like fft. It involves three axes, x, y, and z. The FFT is applied multiple times for fft3D_forward.
|
protected |
| int ModuleBase::FFT_BASE< FPTYPE >::ny_in |
|
protected |
| int int ModuleBase::FFT_BASE< FPTYPE >::nz_in |
| virtual int int int int ModuleBase::FFT_BASE< FPTYPE >::rixy_in |
| virtual int int int int int int int bool bool ModuleBase::FFT_BASE< FPTYPE >::xprime_in = true) |