WarpX
Functions | Variables
ablastr::math::anyfft Namespace Reference

Functions

void setup ()
 
void cleanup ()
 
std::string cufftErrorToString (const cufftResult &err)
 This method converts a cufftResult into the corresponding string. More...
 
FFTplan CreatePlan (const amrex::IntVect &real_size, amrex::Real *const real_array, Complex *const complex_array, const direction dir, const int dim)
 
void DestroyPlan (FFTplan &fft_plan)
 
void Execute (FFTplan &fft_plan)
 
std::string rocfftErrorToString (const rocfft_status err)
 This method converts a rocfftResult into the corresponding string. More...
 

Variables

cufftType VendorR2C = CUFFT_D2Z
 
cufftType VendorC2R = CUFFT_Z2D
 
const auto VendorCreatePlanR2C3D = fftw_plan_dft_r2c_3d
 
const auto VendorCreatePlanC2R3D = fftw_plan_dft_c2r_3d
 
const auto VendorCreatePlanR2C2D = fftw_plan_dft_r2c_2d
 
const auto VendorCreatePlanC2R2D = fftw_plan_dft_c2r_2d
 

Detailed Description

Wrapper around FFT libraries. The header file defines the API and the base types (Complex and VendorFFTPlan), and the implementation for different FFT libraries is done in different cpp files. This wrapper only depends on the underlying FFT library AND on AMReX (There is no dependence on WarpX).

Function Documentation

◆ cleanup()

void ablastr::math::anyfft::cleanup ( )

This function is a wrapper around rocff_cleanup(). It is a no-op in case rocfft is not used.

◆ CreatePlan()

FFTplan ablastr::math::anyfft::CreatePlan ( const amrex::IntVect real_size,
amrex::Real *const  real_array,
Complex *const  complex_array,
const direction  dir,
const int  dim 
)

◆ cufftErrorToString()

std::string ablastr::math::anyfft::cufftErrorToString ( const cufftResult &  err)

This method converts a cufftResult into the corresponding string.

Parameters
[in]erra cufftResult
Returns
an std::string

◆ DestroyPlan()

void ablastr::math::anyfft::DestroyPlan ( FFTplan &  fft_plan)

◆ Execute()

void ablastr::math::anyfft::Execute ( FFTplan &  fft_plan)

◆ rocfftErrorToString()

std::string ablastr::math::anyfft::rocfftErrorToString ( const rocfft_status  err)

This method converts a rocfftResult into the corresponding string.

Parameters
[in]erra rocfftResult
Returns
an std::string

◆ setup()

void ablastr::math::anyfft::setup ( )

This function is a wrapper around rocff_setup(). It is a no-op in case rocfft is not used.

Variable Documentation

◆ VendorC2R

cufftType ablastr::math::anyfft::VendorC2R = CUFFT_Z2D

◆ VendorCreatePlanC2R2D

const auto ablastr::math::anyfft::VendorCreatePlanC2R2D = fftw_plan_dft_c2r_2d

◆ VendorCreatePlanC2R3D

const auto ablastr::math::anyfft::VendorCreatePlanC2R3D = fftw_plan_dft_c2r_3d

◆ VendorCreatePlanR2C2D

const auto ablastr::math::anyfft::VendorCreatePlanR2C2D = fftw_plan_dft_r2c_2d

◆ VendorCreatePlanR2C3D

const auto ablastr::math::anyfft::VendorCreatePlanR2C3D = fftw_plan_dft_r2c_3d

◆ VendorR2C

cufftType ablastr::math::anyfft::VendorR2C = CUFFT_D2Z