![]() |
ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
Particle data communication manager for the GPU. More...
#include <GpuParticleData.hpp>
Inheritance diagram for GpuParticleData:
Collaboration diagram for GpuParticleData:Classes | |
| struct | GpuEnergy |
| Energies that are retrieved from the GPU. More... | |
| struct | GpuParticle |
| Subset of Particle which is copied to the GPU. More... | |
| struct | prop |
| Particle properties that need to be communicated to the GPU. More... | |
| class | Storage |
| Host and device containers for particle data. More... | |
Public Member Functions | |
| GpuParticleData () | |
| ~GpuParticleData () | |
| void | update () |
| void | initialize () |
| void | enable_property (std::size_t property) |
| void | clear_energy_on_device () |
| void | copy_forces_to_host (ParticleRange const &particles, int this_node) |
| void | copy_dip_fld_to_host (ParticleRange const &particles, int this_node) |
| std::size_t | n_particles () const |
| bool | has_compatible_device () const |
| GpuEnergy | copy_energy_to_host () const |
| GpuEnergy * | get_energy_device () const |
| float * | get_particle_positions_device () const |
| float * | get_particle_forces_device () const |
| float * | get_particle_dip_fld_device () const |
| float * | get_particle_torques_device () const |
| float * | get_particle_dipoles_device () const |
| float * | get_particle_charges_device () const |
Public Member Functions inherited from System::Leaf< GpuParticleData > | |
| void | bind_system (std::shared_ptr< System > const &system) |
| void | detach_system (std::shared_ptr< System > const &system) |
Additional Inherited Members | |
Protected Member Functions inherited from System::Leaf< GpuParticleData > | |
| auto & | get_system () |
| auto & | get_system () const |
Protected Attributes inherited from System::Leaf< GpuParticleData > | |
| std::weak_ptr< System > | m_system |
Particle data communication manager for the GPU.
When data is synchronized between host and device memory, a subset of the Particle struct is copied from each particle on the host to the corresponding GpuParticle struct on the device via GpuParticleData::update(). Once the transfer is complete, the particle AoS on the device is copied (or "split") to a SoA automatically.
Note that once a particle member is requested, the corresponding device memory is allocated and populated at every time step, even when the GPU method that originally requested the data is disabled.
Definition at line 52 of file GpuParticleData.hpp.
|
default |
|
default |
| void GpuParticleData::clear_energy_on_device | ( | ) |
Definition at line 341 of file GpuParticleData_cuda.cu.
References cuda_safe_mem, and stream.
| void GpuParticleData::copy_dip_fld_to_host | ( | ParticleRange const & | particles, |
| int | this_node | ||
| ) |
Definition at line 325 of file GpuParticleData_cuda.cu.
| GpuParticleData::GpuEnergy GpuParticleData::copy_energy_to_host | ( | ) | const |
Definition at line 350 of file GpuParticleData_cuda.cu.
References cuda_safe_mem, and stream.
| void GpuParticleData::copy_forces_to_host | ( | ParticleRange const & | particles, |
| int | this_node | ||
| ) |
Definition at line 302 of file GpuParticleData_cuda.cu.
| void GpuParticleData::enable_property | ( | std::size_t | property | ) |
Definition at line 214 of file GpuParticleData_cuda.cu.
References GpuParticleData::prop::dip_fld, GpuParticleData::prop::force, stream, and GpuParticleData::prop::torque.
| GpuParticleData::GpuEnergy * GpuParticleData::get_energy_device | ( | ) | const |
Definition at line 210 of file GpuParticleData_cuda.cu.
| float * GpuParticleData::get_particle_charges_device | ( | ) | const |
Definition at line 205 of file GpuParticleData_cuda.cu.
Referenced by p3m_gpu_add_farfield_force().
| float * GpuParticleData::get_particle_dip_fld_device | ( | ) | const |
Definition at line 187 of file GpuParticleData_cuda.cu.
References raw_data_pointer().
| float * GpuParticleData::get_particle_dipoles_device | ( | ) | const |
Definition at line 199 of file GpuParticleData_cuda.cu.
| float * GpuParticleData::get_particle_forces_device | ( | ) | const |
Definition at line 183 of file GpuParticleData_cuda.cu.
References raw_data_pointer().
Referenced by p3m_gpu_add_farfield_force().
| float * GpuParticleData::get_particle_positions_device | ( | ) | const |
Definition at line 179 of file GpuParticleData_cuda.cu.
Referenced by p3m_gpu_add_farfield_force().
| float * GpuParticleData::get_particle_torques_device | ( | ) | const |
Definition at line 193 of file GpuParticleData_cuda.cu.
References raw_data_pointer().
| bool GpuParticleData::has_compatible_device | ( | ) | const |
Definition at line 57 of file GpuParticleData.cpp.
| void GpuParticleData::initialize | ( | ) |
Definition at line 168 of file GpuParticleData_cuda.cu.
References System::Leaf< GpuParticleData >::get_system(), and stream.
| std::size_t GpuParticleData::n_particles | ( | ) | const |
Definition at line 175 of file GpuParticleData_cuda.cu.
|
inline |
Definition at line 121 of file GpuParticleData.hpp.
References stream.