28#include "system/Leaf.hpp"
55 static constexpr std::size_t
pos = 0;
56 static constexpr std::size_t
force = 1;
57 static constexpr std::size_t
torque = 2;
58 static constexpr std::size_t
q = 3;
59 static constexpr std::size_t
dip = 4;
84 bool m_communication_enabled =
false;
86 bool m_split_particle_struct =
false;
88 bool m_need_particles_update =
false;
90 std::shared_ptr<Storage> m_data;
92 bool has_compatible_device_impl()
const;
93 void gpu_init_particle_comm();
94 void enable_particle_transfer();
95 void copy_particles_to_device();
101 void particles_scatter_forces(
ParticleRange const &particles,
102 std::span<float> host_forces,
103 std::span<float> host_torques)
const;
110 if (m_need_particles_update and m_communication_enabled) {
111 copy_particles_to_device();
std::vector< T, CudaHostAllocator< T > > pinned_vector
Vector implementation and trait types for boost qvm interoperability.
Host and device containers for particle data.
Particle data communication manager for the GPU.
~GpuParticleData()=default
float * get_particle_torques_device() const
float * get_particle_charges_device() const
void copy_forces_to_host(ParticleRange const &particles, int this_node)
GpuEnergy * get_energy_device() const
float * get_particle_dipoles_device() const
float * get_particle_forces_device() const
GpuEnergy copy_energy_to_host() const
void clear_energy_on_device()
void enable_property(std::size_t property)
std::size_t n_particles() const
bool has_compatible_device() const
GpuParticleData()=default
float * get_particle_positions_device() const
Abstract class that represents a component of the system.
int this_node
The number of this node.
This file contains the defaults for ESPResSo.
static auto gather_particle_data(BoxGeometry const &box_geo, ParticleRange const &particles)
Energies that are retrieved from the GPU.
Subset of Particle which is copied to the GPU.
Particle properties that need to be communicated to the GPU.
static constexpr std::size_t force
static constexpr std::size_t torque
static constexpr std::size_t pos
static constexpr std::size_t dip
static constexpr std::size_t q