#include "petscis.h" PetscErrorCode PetscParallelSortInt(PetscLayout mapin, PetscLayout mapout, PetscInt keysin[], PetscInt keysout[])Collective
mapin | - PetscLayout describing the distribution of the input keys | |
mapout | - PetscLayout describing the distribution of the output keys | |
keysin | - the pre-sorted array of integers |
- sorts locally - chooses pivots by sorting (in parallel) (P-1) pivot suggestions from each process using bitonic sort and allgathering a subset of (P-1) of those - using to the pivots to repartition the keys by all-to-all exchange - sorting the repartitioned keys locally (the array is now globally sorted, but does not match the mapout layout) - redistributing to match the mapout layout
If keysin != keysout, then keysin will not be changed during PetscParallelSortInt.