core
Shared MPI block decomposition + asynchronous ghost-layer exchange (header-only C++20)
Loading...
Searching...
No Matches
peclet::core::halo::ParticleMigratorView< Dim > Class Template Reference

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.
 

Detailed Description

template<int Dim>
class peclet::core::halo::ParticleMigratorView< Dim >

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.

Member Function Documentation

◆ init()

template<int Dim>
void peclet::core::halo::ParticleMigratorView< Dim >::init ( const decomp::BlockDecomposer< Dim > &  dec,
int  rank,
DomainMap< Dim >  map,
MPI_Comm  comm = MPI_COMM_WORLD 
)
inline

Definition at line 41 of file particle_migrator_view.hpp.

References peclet::core::toDevice().

◆ lastSent()

template<int Dim>
std::size_t peclet::core::halo::ParticleMigratorView< Dim >::lastSent ( ) const
inline

Definition at line 59 of file particle_migrator_view.hpp.

◆ lastReceived()

template<int Dim>
std::size_t peclet::core::halo::ParticleMigratorView< Dim >::lastReceived ( ) const
inline

Definition at line 60 of file particle_migrator_view.hpp.

◆ migrate()

template<int Dim>
Index peclet::core::halo::ParticleMigratorView< Dim >::migrate ( View< double pos,
View< char payload,
Index  n,
std::size_t  stride 
)
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().


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