|
DNDSR 0.2.1
Distributed Numeric Data Structure for CFV
|
#include <PermutationTransfer.hpp>
Classes | |
| struct | LookupResult |
| Result of buildLookup: ghost-pullable old-global -> new-global map. More... | |
Public Member Functions | |
| template<class TPair > | |
| void | transferRows (TPair &pair, const MPIInfo &mpi) const |
| LookupResult | buildLookup (const std::vector< index > &pullSet, const MPIInfo &mpi) const |
| index | size () const |
| Number of entities (father slots) in this transfer. | |
Static Public Member Functions | |
| static PermutationTransfer | fromPartition (const std::vector< MPI_int > &partition, const ssp< GlobalOffsetsMapping > &oldGlobalMapping, const MPIInfo &mpi) |
| static PermutationTransfer | fromLocalPermutation (const std::vector< index > &old2new, const ssp< GlobalOffsetsMapping > &oldGlobalMapping, const MPIInfo &mpi) |
Public Attributes | |
| std::vector< MPI_int > | targetRanks |
| Per father slot: target rank after reorder. | |
| std::vector< index > | newGlobalIndices |
| New global index for each father slot (same size as targetRanks). | |
| std::vector< index > | pushIndex |
| std::vector< index > | pushStart |
| std::vector< index > | localOld2New |
| bool | isLocalOnly {false} |
| Whether this is a pure rank-local permutation (no cross-rank traffic). | |
| std::vector< index > | newGlobalOffsets |
Encapsulates a distributed or local permutation of array rows.
Given a per-slot target rank assignment, computes:
Then provides transferRows to actually move/permute the data, and buildLookup to create a ghost-pullable old->new global map.
Definition at line 25 of file PermutationTransfer.hpp.
|
inline |
Build a ghost-pullable lookup array for old->new global conversion.
| pullSet | Sorted, deduplicated set of off-rank old globals that need to be resolvable. Typically collected from adj entries pointing to this entity kind. |
| mpi | MPI communicator. |
Definition at line 343 of file PermutationTransfer.hpp.
|
inlinestatic |
Build from a local-only permutation vector. All entities stay on the same rank. targetRanks all == mpi.rank.
| old2new | Local permutation: old local index -> new local index. Must be a valid permutation of [0, N). |
| oldGlobalMapping | Current global offsets mapping. |
| mpi | MPI communicator (used only for rank/size, no communication). |
Definition at line 230 of file PermutationTransfer.hpp.
|
inlinestatic |
Build from partition assignment (target ranks only). New global indices are computed automatically via prefix-sum.
| partition | Per-slot target rank. Size == father size. |
| oldGlobalMapping | Current global offsets mapping for this entity. |
| mpi | MPI communicator. |
Definition at line 141 of file PermutationTransfer.hpp.
|
inline |
Number of entities (father slots) in this transfer.
Definition at line 134 of file PermutationTransfer.hpp.
| void DNDS::PermutationTransfer::transferRows | ( | TPair & | pair, |
| const MPIInfo & | mpi | ||
| ) | const |
Transfer (or permute) rows of an ArrayPair.
After return, pair.father contains the new data. pair.son is reset (stale after distributed transfer).
Definition at line 285 of file PermutationTransfer.hpp.
| bool DNDS::PermutationTransfer::isLocalOnly {false} |
Whether this is a pure rank-local permutation (no cross-rank traffic).
Definition at line 43 of file PermutationTransfer.hpp.
| std::vector<index> DNDS::PermutationTransfer::localOld2New |
Local permutation: localOld2New[i] = new local index for old local i. Only valid when isLocalOnly == true. Empty otherwise.
Definition at line 40 of file PermutationTransfer.hpp.
| std::vector<index> DNDS::PermutationTransfer::newGlobalIndices |
New global index for each father slot (same size as targetRanks).
Definition at line 31 of file PermutationTransfer.hpp.
| std::vector<index> DNDS::PermutationTransfer::newGlobalOffsets |
New global offsets: newGlobalOffsets[r] = first global index owned by rank r after reorder. Size = nRanks + 1.
Definition at line 47 of file PermutationTransfer.hpp.
| std::vector<index> DNDS::PermutationTransfer::pushIndex |
Push CSR: pushIndex[pushStart[r]..pushStart[r+1]) are the local father indices that go to rank r.
Definition at line 35 of file PermutationTransfer.hpp.
| std::vector<index> DNDS::PermutationTransfer::pushStart |
Definition at line 36 of file PermutationTransfer.hpp.
| std::vector<MPI_int> DNDS::PermutationTransfer::targetRanks |
Per father slot: target rank after reorder.
Definition at line 28 of file PermutationTransfer.hpp.