ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
p3m_gpu_cuda.cuh File Reference
#include "system/GpuParticleData.hpp"
#include <utils/Vector.hpp>
#include <cstddef>
#include <memory>

Go to the source code of this file.

Functions

void p3m_gpu_init (std::shared_ptr< P3MGpuParams > &data, int cao, Utils::Vector3i const &mesh, double alpha, Utils::Vector3d const &box_l, std::size_t n_part)
 Initialize the internal data structure of the P3M GPU.
 
void p3m_gpu_add_farfield_force (P3MGpuParams &data, GpuParticleData &gpu, double prefactor, std::size_t n_part)
 The long-range part of the P3M algorithm.
 

Function Documentation

◆ p3m_gpu_add_farfield_force()

◆ p3m_gpu_init()

void p3m_gpu_init ( std::shared_ptr< P3MGpuParams > &  data,
int  cao,
Utils::Vector3i const &  mesh,
double  alpha,
Utils::Vector3d const &  box_l,
std::size_t  n_part 
)

Initialize the internal data structure of the P3M GPU.

Mainly allocation on the device and influence function calculation. Be advised: this needs mesh^3*5*sizeof(REAL_TYPE) of device memory. We use real to complex FFTs, so the size of the reciprocal mesh is (cuFFT convention) Nx * Ny * ( Nz /2 + 1 ).

Definition at line 549 of file p3m_gpu_cuda.cu.

References Utils::Array< T, N >::begin(), block(), Utils::Vector< T, N >::broadcast(), cuda_safe_mem, Utils::Array< T, N >::end(), FFT_PLAN_BACK_FLAG, FFT_PLAN_FORW_FLAG, FFT_TYPE_COMPLEX, KERNELCALL, and REAL_TYPE.

Referenced by CoulombP3MImpl< FloatType, Architecture >::init_gpu_kernels().