12#ifndef HALO_EXCHANGE_H
13#define HALO_EXCHANGE_H
18#include <Kokkos_Core.hpp>
56 bool active()
const {
return !ranks.empty(); }
63 std::vector<int> ranks;
66 std::vector<uint32_t> send_offsets, recv_offsets;
67 Kokkos::View<uint32_t *> send_cells, recv_cells;
68 Kokkos::View<rtype *> send_buffer, recv_buffer;
69 Kokkos::View<rtype *>::host_mirror_type h_send_buffer, h_recv_buffer;
Point-to-point exchange of per-cell state following a Distribution's plan. Buffers are packed on the ...
Definition halo_exchange.h:30
bool uses_nccl() const
Definition halo_exchange.h:58
bool active() const
Definition halo_exchange.h:56
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 ...
Definition halo_exchange.cpp:67
void exchange(const State &U)
Overwrite the halo cells of U with the owners' values (collective among neighbors).
Definition halo_exchange.h:37
void finish(const State &U)
Wait for the messages of start() and fill the halo cells of U (with NCCL: enqueue the filling after t...
Definition halo_exchange.cpp:122
Process-level communication: MPI when built with Mallard_ENABLE_MPI, otherwise a single-rank stub wit...
KOKKOS_INLINE_FUNCTION rtype dot(const rtype *a, const rtype *b)
Compute the dot product of two arrays.
Definition common_math.h:32
Typedefs for common types.
A rank's share of a distributed mesh: owned cells, halo layers and the halo exchange plan.
Conservative state: the flow block and the species partial densities.
Local numbering: owned cells first (in global order), then halo layer 1, 2, ... Every local cell keep...
Definition distribution.h:26
Conservative state of every cell: the flow block and the partial densities of a mixture's species....
Definition state.h:56