Gromacs  2022.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
gmx::ListedForcesGpu::Impl Class Reference

#include <gromacs/listed_forces/listed_forces_gpu_impl.h>

Description

Implements GPU bondeds.

Public Member Functions

 Impl (const gmx_ffparams_t &ffparams, float electrostaticsScaleFactor, const DeviceContext &deviceContext, const DeviceStream &deviceStream, gmx_wallcycle *wcycle)
 Constructor.
 
 ~Impl ()
 Destructor, non-default needed for freeing device-side buffers.
 
void updateInteractionListsAndDeviceBuffers (ArrayRef< const int > nbnxnAtomOrder, const InteractionDefinitions &idef, void *xqDevice, DeviceBuffer< RVec > forceDevice, DeviceBuffer< RVec > fshiftDevice)
 Update lists of interactions from idef suitable for the GPU, using the data structures prepared for PP work. More...
 
void setPbc (PbcType pbcType, const matrix box, bool canMoleculeSpanPbc)
 Update PBC data. More...
 
template<bool calcVir, bool calcEner>
void launchKernel ()
 Launches bonded kernel on a GPU.
 
bool haveInteractions () const
 Returns whether there are bonded interactions assigned to the GPU.
 
void launchEnergyTransfer ()
 Launches the transfer of computed bonded energies.
 
void waitAccumulateEnergyTerms (gmx_enerdata_t *enerd)
 Waits on the energy transfer, and accumulates bonded energies to enerd.
 
void clearEnergies ()
 Clears the device side energy buffer.
 

Member Function Documentation

void gmx::ListedForcesGpu::Impl::setPbc ( PbcType  pbcType,
const matrix  box,
bool  canMoleculeSpanPbc 
)

Update PBC data.

Converts PBC data from t_pbc into the PbcAiuc format and stores the latter.

Parameters
[in]pbcTypeThe type of the periodic boundary.
[in]boxThe periodic boundary box matrix.
[in]canMoleculeSpanPbcWhether one molecule can have atoms in different PBC cells.
void gmx::ListedForcesGpu::Impl::updateInteractionListsAndDeviceBuffers ( ArrayRef< const int >  nbnxnAtomOrder,
const InteractionDefinitions &  idef,
void *  xqDevice,
DeviceBuffer< RVec forceDevice,
DeviceBuffer< RVec fshiftDevice 
)

Update lists of interactions from idef suitable for the GPU, using the data structures prepared for PP work.

Intended to be called after each neighbour search stage. Copies the bonded interactions assigned to the GPU to device data structures, and updates device buffers that may have been updated after search.


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