ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
ModuleBase::FFT_ROCM< FPTYPE > Class Template Reference

#include <fft_rocm.h>

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

Public Member Functions

 FFT_ROCM ()
 ~FFT_ROCM ()
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 initfft (int nx_in, int ny_in, int nz_in) override
 Initialize the fft parameters for ROCM.
std::complex< FPTYPE > * get_auxr_3d_data () const override
 Get the real space data.
void fft3D_forward (std::complex< FPTYPE > *in, std::complex< FPTYPE > *out) const override
 Forward FFT in 3D for ROCM.
void fft3D_backward (std::complex< FPTYPE > *in, std::complex< FPTYPE > *out) const override
 Backward FFT in 3D for ROCM.
void setupFFT ()
 Setup the fft plan and data as pure virtual function.
void setupFFT ()
 Setup the fft plan and data as pure virtual function.
void cleanFFT ()
 Clean the fft plan 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 clear ()
 Clear the fft data as pure virtual function.
void fft3D_forward (std::complex< float > *in, std::complex< float > *out) const
void fft3D_forward (std::complex< double > *in, std::complex< double > *out) const
void fft3D_backward (std::complex< float > *in, std::complex< float > *out) const
void fft3D_backward (std::complex< double > *in, std::complex< double > *out) const
std::complex< float > * get_auxr_3d_data () const
 Get the auxiliary real space data in 3D.
std::complex< double > * get_auxr_3d_data () const
 Get the auxiliary real space data in 3D.
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 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 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

Private Attributes

hipfftHandle c_handle = {}
hipfftHandle z_handle = {}
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

Constructor & Destructor Documentation

◆ FFT_ROCM()

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

◆ ~FFT_ROCM()

template<typename FPTYPE>
template ModuleBase::FFT_ROCM< FPTYPE >::~FFT_ROCM ( )
inline

Member Function Documentation

◆ cleanFFT() [1/3]

void ModuleBase::FFT_ROCM< 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 ModuleBase::FFT_BASE< FPTYPE >.

◆ cleanFFT() [2/3]

void ModuleBase::FFT_ROCM< 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 ModuleBase::FFT_BASE< FPTYPE >.

◆ cleanFFT() [3/3]

template<typename FPTYPE>
void ModuleBase::FFT_ROCM< 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 ModuleBase::FFT_BASE< FPTYPE >.

Here is the caller graph for this function:

◆ clear() [1/3]

void ModuleBase::FFT_ROCM< 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 ModuleBase::FFT_BASE< FPTYPE >.

Here is the call graph for this function:

◆ clear() [2/3]

void ModuleBase::FFT_ROCM< 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 ModuleBase::FFT_BASE< FPTYPE >.

Here is the call graph for this function:

◆ clear() [3/3]

template<typename FPTYPE>
void ModuleBase::FFT_ROCM< 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 ModuleBase::FFT_BASE< FPTYPE >.

◆ fft3D_backward() [1/3]

void ModuleBase::FFT_ROCM< double >::fft3D_backward ( std::complex< double > * in,
std::complex< double > * out ) const

◆ fft3D_backward() [2/3]

void ModuleBase::FFT_ROCM< float >::fft3D_backward ( std::complex< float > * in,
std::complex< float > * out ) const

◆ fft3D_backward() [3/3]

template<typename FPTYPE>
void ModuleBase::FFT_ROCM< FPTYPE >::fft3D_backward ( std::complex< FPTYPE > * in,
std::complex< FPTYPE > * out ) const
overridevirtual

Backward FFT in 3D for ROCM.

Parameters
ininput data, complex FPTYPE
outoutput data, complex FPTYPE

Reimplemented from ModuleBase::FFT_BASE< FPTYPE >.

◆ fft3D_forward() [1/3]

void ModuleBase::FFT_ROCM< double >::fft3D_forward ( std::complex< double > * in,
std::complex< double > * out ) const

◆ fft3D_forward() [2/3]

void ModuleBase::FFT_ROCM< float >::fft3D_forward ( std::complex< float > * in,
std::complex< float > * out ) const

◆ fft3D_forward() [3/3]

template<typename FPTYPE>
void ModuleBase::FFT_ROCM< FPTYPE >::fft3D_forward ( std::complex< FPTYPE > * in,
std::complex< FPTYPE > * out ) const
overridevirtual

Forward FFT in 3D for ROCM.

Parameters
ininput data, complex FPTYPE
outoutput data, complex FPTYPE

Reimplemented from ModuleBase::FFT_BASE< FPTYPE >.

◆ get_auxr_3d_data() [1/3]

std::complex< double > * ModuleBase::FFT_ROCM< double >::get_auxr_3d_data ( ) 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 >.

◆ get_auxr_3d_data() [2/3]

std::complex< float > * ModuleBase::FFT_ROCM< float >::get_auxr_3d_data ( ) 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 >.

◆ get_auxr_3d_data() [3/3]

template<typename FPTYPE>
std::complex< FPTYPE > * ModuleBase::FFT_ROCM< FPTYPE >::get_auxr_3d_data ( ) const
overridevirtual

Get the real space data.

Returns
real space data

Reimplemented from ModuleBase::FFT_BASE< FPTYPE >.

◆ initfft()

template<typename FPTYPE>
void ModuleBase::FFT_ROCM< FPTYPE >::initfft ( int nx_in,
int ny_in,
int nz_in )
overridevirtual

Initialize the fft parameters for ROCM.

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 ModuleBase::FFT_BASE< FPTYPE >.

◆ setupFFT() [1/3]

void ModuleBase::FFT_ROCM< 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 ModuleBase::FFT_BASE< FPTYPE >.

◆ setupFFT() [2/3]

void ModuleBase::FFT_ROCM< 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 ModuleBase::FFT_BASE< FPTYPE >.

◆ setupFFT() [3/3]

template<typename FPTYPE>
void ModuleBase::FFT_ROCM< 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 ModuleBase::FFT_BASE< FPTYPE >.

Member Data Documentation

◆ c_auxr_3d

template<typename FPTYPE>
std::complex<float>* ModuleBase::FFT_ROCM< FPTYPE >::c_auxr_3d = nullptr
mutableprivate

◆ c_handle

template<typename FPTYPE>
hipfftHandle ModuleBase::FFT_ROCM< FPTYPE >::c_handle = {}
private

◆ z_auxr_3d

template<typename FPTYPE>
std::complex<double>* ModuleBase::FFT_ROCM< FPTYPE >::z_auxr_3d = nullptr
mutableprivate

◆ z_handle

template<typename FPTYPE>
hipfftHandle ModuleBase::FFT_ROCM< FPTYPE >::z_handle = {}
private

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