Gromacs  2026.0-dev-20250320-627336d
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
gmx::GpuHaloExchange::Impl Class Reference

#include <gromacs/domdec/gpuhaloexchange_impl_gpu.h>

Description

Impl class stub.

Class with interfaces and data for GPU Halo Exchange.

Public Member Functions

 Impl (gmx_domdec_t *dd, int dimIndex, MPI_Comm mpi_comm_mysim, MPI_Comm mpi_comm_mysim_world, const DeviceContext &deviceContext, int pulse, bool useNvshmem, gmx_wallcycle *wcycle)
 Creates GPU Halo Exchange object. More...
 
void reinitHalo (DeviceBuffer< Float3 > d_coordinatesBuffer, DeviceBuffer< Float3 > d_forcesBuffer)
 (Re-) Initialization for GPU halo exchange More...
 
void reinitNvshmemSignal (const t_commrec &cr, int signalObjOffset)
 (Re-) Initialization for NVSHMEM Signal objects More...
 
GpuEventSynchronizer * communicateHaloCoordinates (const matrix box, GpuEventSynchronizer *dependencyEvent)
 GPU halo exchange of coordinates buffer. More...
 
void communicateHaloForces (bool accumulateForces, FixedCapacityVector< GpuEventSynchronizer *, 2 > *dependencyEvents)
 GPU halo exchange of force buffer. More...
 
GpuEventSynchronizer * getForcesReadyOnDeviceEvent ()
 Get the event synchronizer for the forces ready on device. More...
 
void destroyGpuHaloExchangeNvshmemBuf ()
 Destructor for symmetric d_recvBuf used by NVSHMEM.
 

Constructor & Destructor Documentation

gmx::GpuHaloExchange::Impl::Impl ( gmx_domdec_t *  dd,
int  dimIndex,
MPI_Comm  mpi_comm_mysim,
MPI_Comm  mpi_comm_mysim_world,
const DeviceContext &  deviceContext,
int  pulse,
bool  useNvshmem,
gmx_wallcycle *  wcycle 
)

Creates GPU Halo Exchange object.

Create GpuHaloExchange object.

Parameters
[in,out]dddomdec structure
[in]dimIndexthe dimension index for this instance
[in]mpi_comm_mysimcommunicator used for simulation
[in]mpi_comm_mysim_worldcommunicator used for simulation with PP + PME.
[in]deviceContextGPU device context
[in]pulsethe communication pulse for this instance
[in]useNvshmemuse NVSHMEM for communication
[in]wcycleThe wallclock counter

Member Function Documentation

GpuEventSynchronizer * gmx::GpuHaloExchange::Impl::communicateHaloCoordinates ( const matrix  box,
GpuEventSynchronizer *  dependencyEvent 
)

GPU halo exchange of coordinates buffer.

Parameters
[in]boxCoordinate box (from which shifts will be constructed)
[in]dependencyEventDependency event for this operation
Returns
Event recorded when this operation has been launched
void gmx::GpuHaloExchange::Impl::communicateHaloForces ( bool  accumulateForces,
FixedCapacityVector< GpuEventSynchronizer *, 2 > *  dependencyEvents 
)

GPU halo exchange of force buffer.

Parameters
[in]accumulateForcesTrue if forces should accumulate, otherwise they are set
[in]dependencyEventsDependency events for this operation
GpuEventSynchronizer * gmx::GpuHaloExchange::Impl::getForcesReadyOnDeviceEvent ( )

Get the event synchronizer for the forces ready on device.

Returns
The event to synchronize the stream that consumes forces on device.
void gmx::GpuHaloExchange::Impl::reinitHalo ( DeviceBuffer< Float3 d_coordinatesBuffer,
DeviceBuffer< Float3 d_forcesBuffer 
)

(Re-) Initialization for GPU halo exchange

Parameters
[in]d_coordinatesBufferpointer to coordinates buffer in GPU memory
[in]d_forcesBufferpointer to forces buffer in GPU memory
void gmx::GpuHaloExchange::Impl::reinitNvshmemSignal ( const t_commrec &  cr,
int  signalObjOffset 
)

(Re-) Initialization for NVSHMEM Signal objects

Parameters
[in]crCommunication structure ref.
[in]signalObjOffsetoffset of the signal object corresponding to given pulse/dim.

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