|
pnm 1.0.3
peclet.pnm — pore-network extraction from SDF geometry (Kokkos)
|
Classes | |
| struct | MergeRemap |
| ONE global merge of a cross-block equivalence graph: the local (a,b) pairs are allgathered and union-found on the host (union-by-min-gid: the class root is the min gid, matching the single-rank fixpoint; deterministic on every rank — identical input). More... | |
Functions | |
| int | allreduceMaxInt (int v, MPI_Comm comm) |
| template<class T > | |
| std::vector< T > | allgatherv (const std::vector< T > &local, MPI_Comm comm) |
| Allgatherv a local vector of T (POD) — every rank returns the concatenation. | |
| template<class T > | |
| void | sortUnique (std::vector< T > &v) |
| Sort + unique in place. | |
| template<class Topo > | |
| BlockGeo | blockGeoOf (const Topo &topo, std::array< int, 3 > gdims, int G) |
The extended-block geometry of a halo topology (ghost width G) on the global grid gdims. | |
| template<class T > | |
| peclet::core::View< T > | stageInner (const Exec &space, const BlockGeo &geo, const std::vector< T > &h, const char *name) |
| Stage a host inner block (x-fastest, no ghosts) onto a fresh extended device field (ghosts zero-initialised); the caller exchanges. | |
| template<class T > | |
| std::vector< T > | packInner (const Exec &space, const BlockGeo &geo, const peclet::core::View< T > &e) |
| Pack the owned box of an extended device field into a host vector. | |
| template<class PairView > | |
| std::vector< std::pair< Index, Index > > | localPairs (const PairView &d, std::size_t count) |
| Interleaved device (a,b) Index pairs -> host list, locally sorted/unique. | |
| MergeRemap | globalMerge (const std::vector< std::pair< Index, Index > > &loc, MPI_Comm comm) |
| template<class FieldView , class PredFn > | |
| void | applyRemap (const Exec &space, const MergeRemap &m, const FieldView &field, std::size_t n, const PredFn &pred) |
Apply a MergeRemap to the entries of field selected by pred(i): label -> its class root. | |
| template<class Halo , class TargetView > | |
| void | resolveToFixpoint (const Exec &space, const BlockGeo &geo, Halo &halo, const TargetView &target, MPI_Comm comm, const char *what) |
| Cross-rank fixpoint of the hold-at-ghost pointer jumping (kernels::resolveHoldAtGhost): exchange the state field, resolve one round on every rank, Allreduce the pending count, until no cell is pending. | |
| template<class KeyValFn > | |
| std::vector< std::pair< Index, Index > > | minByKey (std::size_t n, const KeyValFn &kv) |
| Per-rank (key -> min value) reduction on device via UnorderedMap, with capacity-retry. | |
|
inline |
Definition at line 71 of file pore_extraction_mpi.hpp.
|
inline |
Allgatherv a local vector of T (POD) — every rank returns the concatenation.
Definition at line 79 of file pore_extraction_mpi.hpp.
Referenced by globalMerge().
|
inline |
Sort + unique in place.
Definition at line 95 of file pore_extraction_mpi.hpp.
Referenced by localPairs().
|
inline |
The extended-block geometry of a halo topology (ghost width G) on the global grid gdims.
Definition at line 102 of file pore_extraction_mpi.hpp.
References pnm::BlockGeo::ex.
|
inline |
Stage a host inner block (x-fastest, no ghosts) onto a fresh extended device field (ghosts zero-initialised); the caller exchanges.
Definition at line 124 of file pore_extraction_mpi.hpp.
References pnm::kernels::ownedRange(), and pnm::uploadVec().
|
inline |
Pack the owned box of an extended device field into a host vector.
Definition at line 140 of file pore_extraction_mpi.hpp.
References pnm::downloadN(), and pnm::kernels::ownedRange().
|
inline |
Interleaved device (a,b) Index pairs -> host list, locally sorted/unique.
Definition at line 154 of file pore_extraction_mpi.hpp.
References pnm::downloadN(), and sortUnique().
|
inline |
Definition at line 172 of file pore_extraction_mpi.hpp.
References allgatherv(), pnm::detail_mpi::MergeRemap::keys, pnm::detail_mpi::MergeRemap::nk, pnm::detail_mpi::MergeRemap::roots, and pnm::uploadVec().
|
inline |
Apply a MergeRemap to the entries of field selected by pred(i): label -> its class root.
Definition at line 210 of file pore_extraction_mpi.hpp.
References pnm::kernels::bsearchKey(), pnm::detail_mpi::MergeRemap::keys, pnm::detail_mpi::MergeRemap::nk, and pnm::detail_mpi::MergeRemap::roots.
|
inline |
Cross-rank fixpoint of the hold-at-ghost pointer jumping (kernels::resolveHoldAtGhost): exchange the state field, resolve one round on every rank, Allreduce the pending count, until no cell is pending.
Progress is guaranteed (every pending chain finalizes one cross-block hop per round); the round cap is a collective guard.
Definition at line 233 of file pore_extraction_mpi.hpp.
References pnm::kernels::resolveHoldAtGhost().
|
inline |
Per-rank (key -> min value) reduction on device via UnorderedMap, with capacity-retry.
emit(i, key, val) semantics are provided by the caller lambda KeyVal(i, k, v) -> bool (returns false to skip element i). Returns host (key, minValue) pairs.
Definition at line 254 of file pore_extraction_mpi.hpp.
References pnm::downloadN().