ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
P3MFFTBackendFactory.hpp File Reference
#include <config/config.hpp>
#include "p3m/P3MFFTBackend.hpp"
#include "p3m/common.hpp"
#include <utils/Vector.hpp>
#include <utils/index.hpp>
#include <boost/mpi/communicator.hpp>
#include <memory>
+ Include dependency graph for P3MFFTBackendFactory.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

using P3MFFTKokkosConfig = P3MFFTConfig< Utils::MemoryOrder::ROW_MAJOR, Utils::MemoryOrder::ROW_MAJOR, true, 2u >
 The only FFT configuration the kokkos-fft backend implements: row-major layout, r2c transform reducing the contiguous last axis.
 

Functions

template<typename FloatType >
std::shared_ptr< P3MFFTBackend< FloatType, P3MFFTKokkosConfig > > make_p3m_kokkos_fft_backend (boost::mpi::communicator const &comm, Utils::Vector3i const &global_mesh, Utils::Vector3i const &rs_local_ld_index, Utils::Vector3i const &rs_local_ur_index, Utils::Vector3i const &node_grid)
 Build the single-rank kokkos-fft backend (P3MFFTKokkos) when it can serve this run, i.e.
 

Typedef Documentation

◆ P3MFFTKokkosConfig

The only FFT configuration the kokkos-fft backend implements: row-major layout, r2c transform reducing the contiguous last axis.

Definition at line 39 of file P3MFFTBackendFactory.hpp.

Function Documentation

◆ make_p3m_kokkos_fft_backend()

template<typename FloatType >
std::shared_ptr< P3MFFTBackend< FloatType, P3MFFTKokkosConfig > > make_p3m_kokkos_fft_backend ( boost::mpi::communicator const comm,
Utils::Vector3i const global_mesh,
Utils::Vector3i const rs_local_ld_index,
Utils::Vector3i const rs_local_ur_index,
Utils::Vector3i const node_grid 
)

Build the single-rank kokkos-fft backend (P3MFFTKokkos) when it can serve this run, i.e.

when ESPResSo was built with kokkos-fft support and the communicator spans a single MPI rank; return nullptr otherwise so the caller falls back to heFFTe.

Defined once, in a translation unit of the espresso_p3m target – the only scope where the ESPRESSO_KOKKOS_FFT compile definition exists. The templated P3M solver calls this function instead of branching on the macro itself, so every translation unit that instantiates the solver (including unit tests, which are compiled without the macro) agrees on one definition and on the backend-selection behaviour.

Definition at line 38 of file P3MFFTBackendFactory.cpp.

References stream.