|
core
Shared MPI block decomposition + asynchronous ghost-layer exchange (header-only C++20)
|
Device counterpart of ParticleMigrator. More...
#include <particle_migrator_view.hpp>
Public Member Functions | |
| void | init (const decomp::BlockDecomposer< Dim > &dec, int rank, DomainMap< Dim > map, MPI_Comm comm=MPI_COMM_WORLD) |
| std::size_t | lastSent () const |
| std::size_t | lastReceived () const |
| Index | migrate (View< double > pos, View< char > payload, Index n, std::size_t stride) |
| Reassign every particle (i ∈ [0,n)) to its owning rank, in place. | |
Device counterpart of ParticleMigrator.
Particles live in flat device Views: pos is (capacity·Dim) particle-major (pos(i·Dim+d)), payload is (capacity·stride) opaque bytes. migrate() rewrites [0, newCount) in place and returns the new local count.
Definition at line 39 of file particle_migrator_view.hpp.
|
inline |
Definition at line 41 of file particle_migrator_view.hpp.
References peclet::core::toDevice().
|
inline |
Definition at line 59 of file particle_migrator_view.hpp.
|
inline |
Definition at line 60 of file particle_migrator_view.hpp.
|
inline |
Reassign every particle (i ∈ [0,n)) to its owning rank, in place.
Returns the new local count (≤ pos.extent(0)/Dim). Caller must size the Views for the worst-case arrival count.
Definition at line 64 of file particle_migrator_view.hpp.
References peclet::core::toDevice().