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

#include <fft_dsp.h>

Inheritance diagram for ModulePW::FFT_DSP< FPTYPE >:
Collaboration diagram for ModulePW::FFT_DSP< FPTYPE >:

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
 
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 ModulePW::FFT_BASE< FPTYPE >
 FFT_BASE ()
 
virtual ~FFT_BASE ()
 
virtual __attribute__ ((weak)) FPTYPE *get_rspace_data() const
 Get the real space data in cpu-like fft.
 

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
 
- Public Attributes inherited from ModulePW::FFT_BASE< FPTYPE >
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
 

Additional Inherited Members

- Protected Attributes inherited from ModulePW::FFT_BASE< FPTYPE >
int nx = 0
 Forward FFT in 3D.
 
int ny = 0
 
int nz = 0
 

Constructor & Destructor Documentation

◆ FFT_DSP()

template<typename FPTYPE >
template ModulePW::FFT_DSP< FPTYPE >::FFT_DSP ( )
inline

◆ ~FFT_DSP()

template<typename FPTYPE >
template ModulePW::FFT_DSP< FPTYPE >::~FFT_DSP ( )
inline

Member Function Documentation

◆ __attribute__()

template<typename FPTYPE >
virtual ModulePW::FFT_DSP< FPTYPE >::__attribute__ ( (weak)  )
virtual

Initialize the fft parameters.

Parameters
nx_innumber of grid points in x direction
ny_innumber of grid points in y direction
nz_innumber of grid points in z direction

Reimplemented from ModulePW::FFT_BASE< FPTYPE >.

◆ cleanFFT() [1/3]

void ModulePW::FFT_DSP< double >::cleanFFT ( )
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 ModulePW::FFT_BASE< FPTYPE >.

◆ cleanFFT() [2/3]

void ModulePW::FFT_DSP< float >::cleanFFT ( )
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 ModulePW::FFT_BASE< FPTYPE >.

◆ cleanFFT() [3/3]

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

◆ clear() [1/3]

void ModulePW::FFT_DSP< double >::clear ( )
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 ModulePW::FFT_BASE< FPTYPE >.

◆ clear() [2/3]

void ModulePW::FFT_DSP< float >::clear ( )
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 ModulePW::FFT_BASE< FPTYPE >.

◆ clear() [3/3]

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

◆ fft3D_backward()

void ModulePW::FFT_DSP< double >::fft3D_backward ( std::complex< double > *  in,
std::complex< double > *  out 
) const

◆ fft3D_forward()

void ModulePW::FFT_DSP< double >::fft3D_forward ( std::complex< double > *  in,
std::complex< double > *  out 
) const

◆ get_auxr_3d_data()

std::complex< double > * ModulePW::FFT_DSP< double >::get_auxr_3d_data ( ) const

◆ initfft()

void ModulePW::FFT_DSP< double >::initfft ( int  nx_in,
int  ny_in,
int  nz_in 
)

◆ resource_handler() [1/3]

void ModulePW::FFT_DSP< double >::resource_handler ( const int  flag) const
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 ModulePW::FFT_BASE< FPTYPE >.

Here is the call graph for this function:

◆ resource_handler() [2/3]

void ModulePW::FFT_DSP< float >::resource_handler ( const int  flag) const
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 ModulePW::FFT_BASE< FPTYPE >.

◆ resource_handler() [3/3]

template<typename FPTYPE >
void ModulePW::FFT_DSP< FPTYPE >::resource_handler ( const int  flag) const
overridevirtual

Control the allocation or deallocation of hthread resource.

Parameters
flag0: deallocate, 1: allocate

Reimplemented from ModulePW::FFT_BASE< FPTYPE >.

◆ setupFFT() [1/3]

void ModulePW::FFT_DSP< double >::setupFFT ( )
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 ModulePW::FFT_BASE< FPTYPE >.

◆ setupFFT() [2/3]

void ModulePW::FFT_DSP< float >::setupFFT ( )
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 ModulePW::FFT_BASE< FPTYPE >.

◆ setupFFT() [3/3]

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

Member Data Documentation

◆ args_back

template<typename FPTYPE >
unsigned long ModulePW::FFT_DSP< FPTYPE >::args_back[2]
mutable

◆ args_for

template<typename FPTYPE >
unsigned long ModulePW::FFT_DSP< FPTYPE >::args_for[2]
mutable

◆ b_id

template<typename FPTYPE >
INT ModulePW::FFT_DSP< FPTYPE >::b_id =0
mutable

◆ c_auxr_3d

template<typename FPTYPE >
std::complex<float>* ModulePW::FFT_DSP< FPTYPE >::c_auxr_3d = nullptr

◆ cluster_id

template<typename FPTYPE >
INT ModulePW::FFT_DSP< FPTYPE >::cluster_id =0

◆ forward_in

template<typename FPTYPE >
E* ModulePW::FFT_DSP< FPTYPE >::forward_in =nullptr

◆ nxyz

template<typename FPTYPE >
int ModulePW::FFT_DSP< FPTYPE >::nxyz =0

Get the real space data.

Returns
real space data

Forward FFT in 3D

Parameters
ininput data, complex FPTYPE
outoutput data, complex FPTYPE

This function performs the forward FFT in 3D.

Backward FFT in 3D

Parameters
ininput data, complex FPTYPE
outoutput data, complex FPTYPE

This function performs the backward FFT in 3D.

◆ ny_in

template<typename FPTYPE >
virtual int ModulePW::FFT_DSP< FPTYPE >::ny_in

◆ override

template<typename FPTYPE >
virtual int int nz_in ModulePW::FFT_DSP< FPTYPE >::override

◆ ptr_plan_backward

template<typename FPTYPE >
PLAN* ModulePW::FFT_DSP< FPTYPE >::ptr_plan_backward =nullptr

◆ ptr_plan_forward

template<typename FPTYPE >
PLAN* ModulePW::FFT_DSP< FPTYPE >::ptr_plan_forward =nullptr

◆ thread_id_for

template<typename FPTYPE >
INT ModulePW::FFT_DSP< FPTYPE >::thread_id_for =0
mutable

◆ z_auxr_3d

template<typename FPTYPE >
std::complex<double>* ModulePW::FFT_DSP< FPTYPE >::z_auxr_3d = nullptr

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