|
core 0.5.0
Shared MPI block decomposition + asynchronous ghost-layer exchange (header-only C++20)
|
GPU ghost-layer exchange for a contiguous device field peclet::core::View<T> (one element per extended-block cell).
More...
#include <grid_halo.hpp>
Public Member Functions | |
| GridHalo ()=default | |
| GridHalo (const GridHalo &)=delete | |
| GridHalo & | operator= (const GridHalo &)=delete |
| template<int Dim> | |
| void | init (const GridHaloTopology< Dim > &halo) |
| void | exchange (const View< T > &field, int tag=0) |
Exchange ghost layers of the device field field. Blocking (== exchangeBegin+exchangeEnd). | |
| void | exchangeBegin (const View< T > &field, int tag=0) |
| Start an exchange: periodic self-copy, device pack, post Isend/Irecv, return with the messages in flight. | |
| void | exchangeEnd (const View< T > &field) |
Complete the exchange started by exchangeBegin: wait, then scatter the received halo cells into field's ghost region (must be the same field). | |
GPU ghost-layer exchange for a contiguous device field peclet::core::View<T> (one element per extended-block cell).
Build once from a host GridHaloTopology via init(); exchange() runs every step.
Definition at line 125 of file grid_halo.hpp.
|
default |
|
delete |
|
delete |
|
inline |
Definition at line 132 of file grid_halo.hpp.
References peclet::core::halo::GridHaloTopology< Dim >::flatten(), and peclet::core::toDevice().
|
inline |
Exchange ghost layers of the device field field. Blocking (== exchangeBegin+exchangeEnd).
Definition at line 166 of file grid_halo.hpp.
References peclet::core::halo::GridHalo< T >::exchangeBegin(), and peclet::core::halo::GridHalo< T >::exchangeEnd().
|
inline |
Start an exchange: periodic self-copy, device pack, post Isend/Irecv, return with the messages in flight.
The caller may run kernels that touch only INNER (non-ghost, non-send) cells before exchangeEnd — that overlap is the point of the split. One exchange may be in flight per GridHalo instance.
Definition at line 175 of file grid_halo.hpp.
References peclet::core::halo::detail::gpuAwareMpi(), MPI_BYTE, MPI_Irecv(), and MPI_Isend().
Referenced by peclet::core::halo::GridHalo< T >::exchange().
|
inline |
Complete the exchange started by exchangeBegin: wait, then scatter the received halo cells into field's ghost region (must be the same field).
Definition at line 219 of file grid_halo.hpp.
References MPI_STATUSES_IGNORE, and MPI_Waitall().
Referenced by peclet::core::halo::GridHalo< T >::exchange().