Class TempLat::FFTLibraryInterface
template <size_t NDim>
ClassList > TempLat > FFTLibraryInterface
A pure abstract class (interface!) which defines the methods that you must implement for your new fft library to play well with us. More...
#include <fftlibraryinterface.h>
Inherited by the following classes: TempLat::FFTWPlanner, TempLat::KokkosFFTPlanner, TempLat::ParafaftPlanner
Public Functions
| Type | Name |
|---|---|
| FFTLibraryInterface () = default |
|
| virtual FFTLayoutStruct< NDim > | computeLocalSizes (MPICartesianGroup group, device::IdxArray< NDim > nGridPoints, bool forbidTransposition=false) = 0 given an actual setup, return the description of the subarray of the global problem that this process holds. |
| virtual IntrinsicScales | getIntrinsicRescaleToGetUnnormalizedFFT (device::Idx nGridPoints) = 0 The lattice objects expect an unnormalized FFT, such as the one FFTW gives: applying once forward and then backward should return the input values multiplied by nGridPoints^nDimensions, i.e. the total number of values in the problem. If your library does not respect that, return the factor by which we must multiply the output values to obtain the unnormalized FFT. Return defaultIntrinsicScales (exact (double) 1) in order not to waste time, if your library does it like FFTW. |
| virtual device::Idx | getMaximumNumberOfDimensionsToDivide (device::Idx nDimensions) = 0 Return the number of dimensions over which the MPI processes can be distributed, given a problem of dimension nDimensions. FFTW can only divide in 1 dimension: the leading dimension. ParaFaFT can divide an N dimensional setup over the leading N - 1 dimensions. |
| virtual std::shared_ptr< FFTPlanInterface< double, NDim > > | getPlans_double (const MPICartesianGroup & group, const FFTLayoutStruct< NDim > & layout) = 0 Create fully working plans, which must self-destruct in the FFTPlanInterface 's destructor. Use shared_ptr's. |
| virtual std::shared_ptr< FFTPlanInterface< float, NDim > > | getPlans_float (const MPICartesianGroup & group, const FFTLayoutStruct< NDim > & layout) = 0 Create fully working plans, which must self-destruct in the FFTPlanInterface 's destructor. Use shared_ptr's. Since we use virtual methods here, we cannot use templates. Only one type of dynamic typing allowed by C++, either runtime (virtual) or compile time (template). |
| virtual void | setPlannerPatience (int level) = 0 If your library has different levels of patience for the planning phase, set it here. |
| virtual | ~FFTLibraryInterface () = default |
Detailed Description
Unit test: ctest -R test-fftlibraryinterface
Public Functions Documentation
function FFTLibraryInterface
function computeLocalSizes
given an actual setup, return the description of the subarray of the global problem that this process holds.
virtual FFTLayoutStruct < NDim > TempLat::FFTLibraryInterface::computeLocalSizes (
MPICartesianGroup group,
device::IdxArray< NDim > nGridPoints,
bool forbidTransposition=false
) = 0
function getIntrinsicRescaleToGetUnnormalizedFFT
The lattice objects expect an unnormalized FFT, such as the one FFTW gives: applying once forward and then backward should return the input values multiplied by nGridPoints^nDimensions, i.e. the total number of values in the problem. If your library does not respect that, return the factor by which we must multiply the output values to obtain the unnormalized FFT. Return defaultIntrinsicScales (exact (double) 1) in order not to waste time, if your library does it like FFTW.
virtual IntrinsicScales TempLat::FFTLibraryInterface::getIntrinsicRescaleToGetUnnormalizedFFT (
device::Idx nGridPoints
) = 0
function getMaximumNumberOfDimensionsToDivide
Return the number of dimensions over which the MPI processes can be distributed, given a problem of dimension nDimensions. FFTW can only divide in 1 dimension: the leading dimension. ParaFaFT can divide an N dimensional setup over the leading N - 1 dimensions.
virtual device::Idx TempLat::FFTLibraryInterface::getMaximumNumberOfDimensionsToDivide (
device::Idx nDimensions
) = 0
The calling function needs to know, because the user may switch between layouts after compilation.
function getPlans_double
Create fully working plans, which must self-destruct in the FFTPlanInterface 's destructor. Use shared_ptr's.
virtual std::shared_ptr< FFTPlanInterface < double, NDim > > TempLat::FFTLibraryInterface::getPlans_double (
const MPICartesianGroup & group,
const FFTLayoutStruct < NDim > & layout
) = 0
function getPlans_float
Create fully working plans, which must self-destruct in the FFTPlanInterface 's destructor. Use shared_ptr's. Since we use virtual methods here, we cannot use templates. Only one type of dynamic typing allowed by C++, either runtime (virtual) or compile time (template).
virtual std::shared_ptr< FFTPlanInterface < float, NDim > > TempLat::FFTLibraryInterface::getPlans_float (
const MPICartesianGroup & group,
const FFTLayoutStruct < NDim > & layout
) = 0
function setPlannerPatience
If your library has different levels of patience for the planning phase, set it here.
function ~FFTLibraryInterface
The documentation for this class was generated from the following file cosmolatticeweb/tmp/code_source/templat/include/TempLat/fft/fftlibraryinterface.h