Gromacs  2024.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
gmx::Gpu3dFft::Impl Class Referenceabstract

#include <gromacs/fft/gpu_3dfft_impl.h>

+ Inheritance diagram for gmx::Gpu3dFft::Impl:

Description

Impl base class for all FFT backends.

Public Member Functions

 Impl ()
 Default constructor.
 
 Impl (bool performOutOfPlaceFFT)
 Constructor called from dervied classes.
 
 Impl (bool allocateRealGrid, MPI_Comm comm, ArrayRef< const int > gridSizesInXForEachRank, ArrayRef< const int > gridSizesInYForEachRank, int nz, bool performOutOfPlaceFFT, const DeviceContext &context, const DeviceStream &pmeStream, ivec realGridSize, ivec realGridSizePadded, ivec complexGridSizePadded, DeviceBuffer< float > *realGrid, DeviceBuffer< float > *complexGrid)
 Constructs GPU FFT plans for performing 3D FFT on a PME grid. More...
 
virtual ~Impl ()
 Default destructor.
 
virtual void perform3dFft (gmx_fft_direction dir, CommandEvent *timingEvent)=0
 Performs the FFT transform in given direction. More...
 

Protected Member Functions

void allocateComplexGrid (const ivec complexGridSizePadded, DeviceBuffer< float > *realGrid, DeviceBuffer< float > *complexGrid, const DeviceContext &context)
 Allocate and assign complexGrid.
 
void deallocateComplexGrid ()
 free complexGrid
 

Protected Attributes

bool performOutOfPlaceFFT_ = false
 A boolean which tells whether the complex and real grids are different or same. Currenty true.
 
DeviceBuffer< float > complexGrid_
 FFT complex grid.
 

Constructor & Destructor Documentation

gmx::Gpu3dFft::Impl::Impl ( bool  allocateRealGrid,
MPI_Comm  comm,
ArrayRef< const int >  gridSizesInXForEachRank,
ArrayRef< const int >  gridSizesInYForEachRank,
int  nz,
bool  performOutOfPlaceFFT,
const DeviceContext &  context,
const DeviceStream pmeStream,
ivec  realGridSize,
ivec  realGridSizePadded,
ivec  complexGridSizePadded,
DeviceBuffer< float > *  realGrid,
DeviceBuffer< float > *  complexGrid 
)

Constructs GPU FFT plans for performing 3D FFT on a PME grid.

Parameters
[in]allocateRealGridTrue if fft real-grid is to be allocated, false if pre-allocated
[in]commMPI communicator, used with distributed-FFT backends
[in]gridSizesInXForEachRankNumber of grid points used with each rank in X-dimension
[in]gridSizesInYForEachRankNumber of grid points used with each rank in Y-dimension
[in]nzGrid dimension in Z
[in]performOutOfPlaceFFTWhether the FFT will be performed out-of-place
[in]contextGPU context
[in]pmeStreamGPU stream for PME
[in,out]realGridSizeDimensions of the local real grid, out if allocateRealGrid=true
[in,out]realGridSizePaddedDimensions of the local real grid with padding, out if allocateRealGrid=true
[in,out]complexGridSizePaddedDimensions of the local complex grid with padding, out if allocateRealGrid=true
[in,out]realGridDevice buffer of floats for the local real grid, out if allocateRealGrid=true
[out]complexGridDevice buffer of complex floats for the local complex grid

Member Function Documentation

virtual void gmx::Gpu3dFft::Impl::perform3dFft ( gmx_fft_direction  dir,
CommandEvent timingEvent 
)
pure virtual

Performs the FFT transform in given direction.

Parameters
[in]dirFFT transform direction specifier
[out]timingEventpointer to the timing event where timing data is recorded

Implemented in gmx::Gpu3dFft::ImplOclVkfft, gmx::Gpu3dFft::ImplSyclVkfft, gmx::Gpu3dFft::ImplCuFftMp, gmx::Gpu3dFft::ImplCuFft, gmx::Gpu3dFft::ImplOcl, gmx::Gpu3dFft::ImplSyclBbfft, gmx::Gpu3dFft::ImplSyclMkl, gmx::Gpu3dFft::ImplSyclRocfft, and gmx::Gpu3dFft::ImplSycl.


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