ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Attributes | List of all members
ModuleBase::FFT_BASE< FPTYPE > Class Template Referenceabstract

#include <fft_base.h>

Inheritance diagram for ModuleBase::FFT_BASE< FPTYPE >:
Collaboration diagram for ModuleBase::FFT_BASE< FPTYPE >:

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
 

Constructor & Destructor Documentation

◆ FFT_BASE()

template<typename FPTYPE >
template ModuleBase::FFT_BASE< FPTYPE >::FFT_BASE ( )
inline

◆ ~FFT_BASE()

template<typename FPTYPE >
template ModuleBase::FFT_BASE< FPTYPE >::~FFT_BASE ( )
inlinevirtual

Member Function Documentation

◆ __attribute__() [1/4]

template<typename FPTYPE >
virtual ModuleBase::FFT_BASE< FPTYPE >::__attribute__ ( (weak)  ) const
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 >.

◆ __attribute__() [2/4]

template<typename 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 ModuleBase::FFT_BASE< FPTYPE >::__attribute__ ( (weak)  )
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

Parameters
ininput data
outoutput 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

Parameters
ininput data
outoutput 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

Parameters
ininput data, real type
outoutput 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 >.

◆ __attribute__() [3/4]

template<typename FPTYPE >
virtual ModuleBase::FFT_BASE< FPTYPE >::__attribute__ ( (weak)  )
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 >.

◆ __attribute__() [4/4]

template<typename FPTYPE >
virtual ModuleBase::FFT_BASE< FPTYPE >::__attribute__ ( (weak)  )
virtual

◆ cleanFFT()

template<typename FPTYPE >
virtual void ModuleBase::FFT_BASE< FPTYPE >::cleanFFT ( )
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 >.

◆ clear()

template<typename FPTYPE >
virtual void ModuleBase::FFT_BASE< FPTYPE >::clear ( )
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 >.

◆ resource_handler()

template<typename FPTYPE >
virtual void ModuleBase::FFT_BASE< FPTYPE >::resource_handler ( const int  flag) const
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 >.

◆ setupFFT()

template<typename FPTYPE >
virtual void ModuleBase::FFT_BASE< FPTYPE >::setupFFT ( )
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 >.

Member Data Documentation

◆ const

template<typename 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

◆ gamma_only_in

template<typename FPTYPE >
virtual int int int int int int int bool ModuleBase::FFT_BASE< FPTYPE >::gamma_only_in

◆ lixy_in

template<typename FPTYPE >
virtual int int int ModuleBase::FFT_BASE< FPTYPE >::lixy_in

◆ nplane_in

template<typename FPTYPE >
virtual int int int int int int ModuleBase::FFT_BASE< FPTYPE >::nplane_in

◆ nproc_in

template<typename FPTYPE >
virtual int int int int int int int ModuleBase::FFT_BASE< FPTYPE >::nproc_in

◆ ns_in

template<typename FPTYPE >
virtual int int int int int ModuleBase::FFT_BASE< FPTYPE >::ns_in

◆ nx

template<typename FPTYPE >
int ModuleBase::FFT_BASE< FPTYPE >::nx = 0
protected

Forward FFT in 3D.

Parameters
ininput data
outoutput 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.

◆ ny

template<typename FPTYPE >
int ModuleBase::FFT_BASE< FPTYPE >::ny = 0
protected

◆ ny_in

template<typename FPTYPE >
int ModuleBase::FFT_BASE< FPTYPE >::ny_in

◆ nz

template<typename FPTYPE >
int ModuleBase::FFT_BASE< FPTYPE >::nz = 0
protected

◆ nz_in

template<typename FPTYPE >
int int ModuleBase::FFT_BASE< FPTYPE >::nz_in

◆ rixy_in

template<typename FPTYPE >
virtual int int int int ModuleBase::FFT_BASE< FPTYPE >::rixy_in

◆ xprime_in

template<typename FPTYPE >
virtual int int int int int int int bool bool ModuleBase::FFT_BASE< FPTYPE >::xprime_in = true)

The documentation for this class was generated from the following file: