ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
#include <fft_cpu.h>
Public Member Functions | |
FFT_CPU () | |
FFT_CPU (const int fft_mode_in) | |
~FFT_CPU () | |
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) override |
Initialize the fft parameters. | |
__attribute__ ((weak)) void setupFFT() override | |
Initialize the fft parameters as virtual function. | |
__attribute__ ((weak)) void cleanFFT() override | |
Initialize the fft parameters as virtual function. | |
__attribute__ ((weak)) void clear() override | |
Initialize the fft parameters as virtual function. | |
__attribute__ ((weak)) FPTYPE *get_rspace_data() const override | |
Get the real space data the CPU FFT. | |
__attribute__((weak)) std __attribute__((weak)) std __attribute__((weak)) void fftxyfor(std __attribute__((weak)) void fftxybac(std __attribute__((weak)) void fftzfor(std __attribute__((weak)) void fftzbac(std | __attribute__ ((weak)) void fftxyr2c(FPTYPE *in |
Forward FFT in x-y direction. | |
void | setupFFT () |
Setup the fft plan and data 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 | fftxyfor (std::complex< double > *in, std::complex< double > *out) const |
void | fftxybac (std::complex< double > *in, std::complex< double > *out) const |
void | fftzfor (std::complex< double > *in, std::complex< double > *out) const |
void | fftzbac (std::complex< double > *in, std::complex< double > *out) const |
void | fftxyr2c (double *in, std::complex< double > *out) const |
void | fftxyc2r (std::complex< double > *in, double *out) const |
double * | get_rspace_data () const |
std::complex< double > * | get_auxr_data () const |
std::complex< double > * | get_auxg_data () const |
void | setupFFT () |
Setup the fft plan and data 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 | fftxyfor (std::complex< float > *in, std::complex< float > *out) const |
void | fftxybac (std::complex< float > *in, std::complex< float > *out) const |
void | fftzfor (std::complex< float > *in, std::complex< float > *out) const |
void | fftzbac (std::complex< float > *in, std::complex< float > *out) const |
void | fftxyr2c (float *in, std::complex< float > *out) const |
void | fftxyc2r (std::complex< float > *in, float *out) const |
float * | get_rspace_data () const |
std::complex< float > * | get_auxr_data () const |
std::complex< float > * | get_auxg_data () const |
![]() | |
FFT_BASE () | |
virtual | ~FFT_BASE () |
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. | |
Public Attributes | |
__attribute__((weak)) std __attribute__((weak)) std __attribute__((weak)) void fftxyfor(std __attribute__((weak)) void fftxybac(std __attribute__((weak)) void fftzfor(std __attribute__((weak)) void fftzbac(std std::complex< FPTYPE > *out const | override |
![]() | |
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 |
Private Member Functions | |
void | clearfft (fftw_plan &plan) |
void | clearfft (fftwf_plan &plan) |
void | clearfft (fftw_plan &plan) |
void | clearfft (fftwf_plan &plan) |
Private Attributes | |
fftw_plan | planzfor = NULL |
fftw_plan | planzbac = NULL |
fftw_plan | planxfor1 = NULL |
fftw_plan | planxbac1 = NULL |
fftw_plan | planxfor2 = NULL |
fftw_plan | planxbac2 = NULL |
fftw_plan | planyfor = NULL |
fftw_plan | planybac = NULL |
fftw_plan | planxr2c = NULL |
fftw_plan | planxc2r = NULL |
fftw_plan | planyr2c = NULL |
fftw_plan | planyc2r = NULL |
fftwf_plan | planfzfor = NULL |
fftwf_plan | planfzbac = NULL |
fftwf_plan | planfxfor1 = NULL |
fftwf_plan | planfxbac1 = NULL |
fftwf_plan | planfxfor2 = NULL |
fftwf_plan | planfxbac2 = NULL |
fftwf_plan | planfyfor = NULL |
fftwf_plan | planfybac = NULL |
fftwf_plan | planfxr2c = NULL |
fftwf_plan | planfxc2r = NULL |
fftwf_plan | planfyr2c = NULL |
fftwf_plan | planfyc2r = NULL |
std::complex< float > * | c_auxg = nullptr |
std::complex< float > * | c_auxr = nullptr |
std::complex< double > * | z_auxg = nullptr |
std::complex< double > * | z_auxr = nullptr |
float * | s_rspace = nullptr |
double * | d_rspace = nullptr |
int | fftnx =0 |
int | fftny =0 |
int | fftnxy =0 |
int | nxy =0 |
int | nplane =0 |
int | ns =0 |
int | nproc =1 |
int | maxgrids = 0 |
bool | gamma_only = false |
int | lixy =0 |
lixy: the left edge of the pw ball in the y direction | |
int | rixy =0 |
rixy: the right edge of the pw ball in the x or y direction | |
bool | xprime = true |
xprime: whether xprime is used,when do recip2real, x-fft will be done last and when doing real2recip, x-fft will be done first; false: y-fft For gamma_only, true: we use half x; false: we use half y | |
int | fft_mode = 0 |
fft_mode: fftw mode 0: estimate, 1: measure, 2: patient, 3: exhaustive | |
Additional Inherited Members | |
![]() | |
int | nx = 0 |
Forward FFT in 3D. | |
int | ny = 0 |
int | nz = 0 |
|
inline |
|
inline |
|
inline |
|
overridevirtual |
Get the real space data the CPU FFT.
the function will return the real space data, which is used in the CPU fft.Use the weak attribute to avoid defining float while without flag ENABLE_FLOAT_FFTW.
Reimplemented from ModulePW::FFT_BASE< FPTYPE >.
|
overridevirtual |
Initialize the fft parameters as virtual function.
The function is used to initialize the fft parameters.
Reimplemented from ModulePW::FFT_BASE< FPTYPE >.
|
overridevirtual |
Initialize the fft parameters as virtual function.
The function is used to initialize the fft parameters.
Reimplemented from ModulePW::FFT_BASE< FPTYPE >.
|
virtual |
Forward FFT in x-y direction.
in | input data |
out | output data |
The function details can be found in FFT_BASE, and the function interfaces can be found in FFT_BUNDLE.
Reimplemented from ModulePW::FFT_BASE< FPTYPE >.
|
overridevirtual |
Initialize the fft parameters as virtual function.
The function is used to initialize the fft parameters.
Reimplemented from ModulePW::FFT_BASE< FPTYPE >.
|
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 >.
|
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 >.
|
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 >.
|
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 >.
|
private |
|
private |
|
private |
|
private |
void ModulePW::FFT_CPU< double >::fftxybac | ( | std::complex< double > * | in, |
std::complex< double > * | out | ||
) | const |
void ModulePW::FFT_CPU< float >::fftxybac | ( | std::complex< float > * | in, |
std::complex< float > * | out | ||
) | const |
void ModulePW::FFT_CPU< double >::fftxyc2r | ( | std::complex< double > * | in, |
double * | out | ||
) | const |
void ModulePW::FFT_CPU< float >::fftxyc2r | ( | std::complex< float > * | in, |
float * | out | ||
) | const |
void ModulePW::FFT_CPU< double >::fftxyfor | ( | std::complex< double > * | in, |
std::complex< double > * | out | ||
) | const |
void ModulePW::FFT_CPU< float >::fftxyfor | ( | std::complex< float > * | in, |
std::complex< float > * | out | ||
) | const |
void ModulePW::FFT_CPU< double >::fftxyr2c | ( | double * | in, |
std::complex< double > * | out | ||
) | const |
void ModulePW::FFT_CPU< float >::fftxyr2c | ( | float * | in, |
std::complex< float > * | out | ||
) | const |
void ModulePW::FFT_CPU< double >::fftzbac | ( | std::complex< double > * | in, |
std::complex< double > * | out | ||
) | const |
void ModulePW::FFT_CPU< float >::fftzbac | ( | std::complex< float > * | in, |
std::complex< float > * | out | ||
) | const |
void ModulePW::FFT_CPU< double >::fftzfor | ( | std::complex< double > * | in, |
std::complex< double > * | out | ||
) | const |
void ModulePW::FFT_CPU< float >::fftzfor | ( | std::complex< float > * | in, |
std::complex< float > * | out | ||
) | const |
std::complex< double > * ModulePW::FFT_CPU< double >::get_auxg_data | ( | ) | const |
std::complex< float > * ModulePW::FFT_CPU< float >::get_auxg_data | ( | ) | const |
std::complex< double > * ModulePW::FFT_CPU< double >::get_auxr_data | ( | ) | const |
std::complex< float > * ModulePW::FFT_CPU< float >::get_auxr_data | ( | ) | const |
double * ModulePW::FFT_CPU< double >::get_rspace_data | ( | ) | const |
float * ModulePW::FFT_CPU< float >::get_rspace_data | ( | ) | const |
|
override |
Initialize the fft parameters.
nx_in | number of grid points in x direction. |
ny_in | number of grid points in y direction. |
nz_in | number of grid points in z direction. |
lixy_in | the position of the left boundary in the x-y plane. |
rixy_in | the position of the right boundary in the x-y plane. |
ns_in | number of stick whcih is used in the Z direction. |
nplane_in | number of x-y planes. |
nproc_in | number of processors. |
gamma_only_in | whether only gamma point is used. |
xprime_in | whether xprime is used. |
|
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 >.
|
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 >.
|
private |
|
private |
|
private |
|
private |
fft_mode: fftw mode 0: estimate, 1: measure, 2: patient, 3: exhaustive
|
private |
|
private |
|
private |
|
private |
|
private |
lixy: the left edge of the pw ball in the y direction
|
private |
|
private |
|
private |
|
private |
|
private |
__attribute__((weak)) std __attribute__((weak)) std __attribute__((weak)) void fftxyfor(std __attribute__((weak)) void fftxybac(std __attribute__((weak)) void fftzfor(std __attribute__((weak)) void fftzbac(std std::complex<FPTYPE>* out const ModulePW::FFT_CPU< FPTYPE >::override |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
rixy: the right edge of the pw ball in the x or y direction
|
private |
|
private |
xprime: whether xprime is used,when do recip2real, x-fft will be done last and when doing real2recip, x-fft will be done first; false: y-fft For gamma_only, true: we use half x; false: we use half y
|
private |
|
private |