ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
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
 
std::complex< double > * get_auxr_3d_data () const
 
- Public Member Functions inherited from ModuleBase::FFT_BASE< FPTYPE >
 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 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.
 

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

- Public Attributes inherited from ModuleBase::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
 
- Protected Attributes inherited from ModuleBase::FFT_BASE< FPTYPE >
int nx = 0
 Forward FFT in 3D.
 
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< 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() [2/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() [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 >.

◆ clear() [1/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 >.

◆ clear() [2/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 >.

◆ 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
override

Backward FFT in 3D for ROCM.

Parameters
ininput data, complex FPTYPE
outoutput data, complex 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
override

Forward FFT in 3D for ROCM.

Parameters
ininput data, complex FPTYPE
outoutput data, complex FPTYPE

◆ get_auxr_3d_data() [1/3]

std::complex< float > * ModuleBase::FFT_ROCM< float >::get_auxr_3d_data ( ) const

◆ get_auxr_3d_data() [2/3]

std::complex< double > * ModuleBase::FFT_ROCM< double >::get_auxr_3d_data ( ) const

◆ get_auxr_3d_data() [3/3]

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

Get the real space data.

Returns
real space data

◆ initfft()

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

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

◆ setupFFT() [1/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() [2/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() [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: