1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD> <link rel="canonical" href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/IS/PetscParallelSortInt.html" />
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>PetscParallelSortInt</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<div id="version" align=right><b>petsc-3.14.5 2021-03-03</b></div>
<div id="bugreport" align=right><a href="mailto:petsc-maint@mcs.anl.gov?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: petsc-3.14.5 v3.14.5 docs/manualpages/IS/PetscParallelSortInt.html "><small>Report Typos and Errors</small></a></div>
<A NAME="PetscParallelSortInt"><H1>PetscParallelSortInt</H1></A>
Globally sort a distributed array of integers
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
#include "petscis.h"
<A HREF="../Sys/PetscErrorCode.html#PetscErrorCode">PetscErrorCode</A> <A HREF="../IS/PetscParallelSortInt.html#PetscParallelSortInt">PetscParallelSortInt</A>(<A HREF="../IS/PetscLayout.html#PetscLayout">PetscLayout</A> mapin, <A HREF="../IS/PetscLayout.html#PetscLayout">PetscLayout</A> mapout, <A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> keysin[], <A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> keysout[])
</PRE>
Collective
<P>
<H3><FONT COLOR="#CC3333">Input Parameters</FONT></H3>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mapin </B></TD><TD>- <A HREF="../IS/PetscLayout.html#PetscLayout">PetscLayout</A> describing the distribution of the input keys
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mapout </B></TD><TD>- <A HREF="../IS/PetscLayout.html#PetscLayout">PetscLayout</A> describing the distribution of the output keys
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>keysin </B></TD><TD>- the pre-sorted array of integers
</TD></TR></TABLE>
<P>
<H3><FONT COLOR="#CC3333">Output Parameter</FONT></H3>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>keysout </B></TD><TD>- the array in which the sorted integers will be stored. If mapin == mapout, then keysin may be equal to keysout.
</TD></TR></TABLE>
<P>
<P>
<H3><FONT COLOR="#CC3333">Notes: This implements a distributed samplesort, which, with local array sizes n_in and n_out, global size N, and global number of processes P, does</FONT></H3>
<P>
- 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
<P>
If keysin != keysout, then keysin will not be changed during <A HREF="../IS/PetscParallelSortInt.html#PetscParallelSortInt">PetscParallelSortInt</A>.
<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
<A HREF="../Sys/PetscParallelSortedInt.html#PetscParallelSortedInt">PetscParallelSortedInt</A>()
<BR><P><B></B><H3><FONT COLOR="#CC3333">Level</FONT></H3>developer<BR>
<H3><FONT COLOR="#CC3333">Location</FONT></H3>
</B><A HREF="../../../src/vec/is/utils/psort.c.html#PetscParallelSortInt">src/vec/is/utils/psort.c</A>
<BR><A HREF="./index.html">Index of all IS routines</A>
<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
<BR><A HREF="../singleindex.html">Index of all manual pages</A>
</BODY></HTML>
|