Mallard 0.8.0
Unstructured, GPU accelerated, high-order finite volume CFD solver
Mallard website
Loading...
Searching...
No Matches
HaloExchange Class Reference

Point-to-point exchange of per-cell state following a Distribution's plan. Buffers are packed on the device; they go to MPI directly when host-accessible or with Mallard_GPU_AWARE_MPI, else through host copies. More...

#include <halo_exchange.h>

Public Member Functions

 HaloExchange ()=default
 
 HaloExchange (const Distribution &dist, bool nccl)
 With nccl, messages are NCCL operations on the default execution space's stream.
 
void exchange (const State &U)
 Overwrite the halo cells of U with the owners' values (collective among neighbors).
 
void start (const State &U)
 Send the owned values of U that neighbors need and post the receives; the halo cells of U stay stale until finish(). With NCCL nothing blocks the host: the messages are ordered after the work enqueued so far on the default execution space.
 
void finish (const State &U)
 Wait for the messages of start() and fill the halo cells of U (with NCCL: enqueue the filling after the messages).
 
bool active () const
 
bool uses_nccl () const
 

Detailed Description

Point-to-point exchange of per-cell state following a Distribution's plan. Buffers are packed on the device; they go to MPI directly when host-accessible or with Mallard_GPU_AWARE_MPI, else through host copies.

Constructor & Destructor Documentation

◆ HaloExchange() [1/2]

HaloExchange::HaloExchange ( )
default

◆ HaloExchange() [2/2]

HaloExchange::HaloExchange ( const Distribution &  dist,
bool  nccl 
)

With nccl, messages are NCCL operations on the default execution space's stream.

Member Function Documentation

◆ active()

bool HaloExchange::active ( ) const
inline

◆ exchange()

void HaloExchange::exchange ( const State &  U)
inline

Overwrite the halo cells of U with the owners' values (collective among neighbors).

◆ finish()

void HaloExchange::finish ( const State &  U)

Wait for the messages of start() and fill the halo cells of U (with NCCL: enqueue the filling after the messages).

◆ start()

void HaloExchange::start ( const State &  U)

Send the owned values of U that neighbors need and post the receives; the halo cells of U stay stale until finish(). With NCCL nothing blocks the host: the messages are ordered after the work enqueued so far on the default execution space.

◆ uses_nccl()

bool HaloExchange::uses_nccl ( ) const
inline

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