Statistiques
| Révision :

root / man / man3 / HPL_perm.3

Historique | Voir | Annoter | Télécharger (1,65 ko)

1 1 equemene
.TH HPL_perm 3 "September 10, 2008" "HPL 2.0" "HPL Library Functions"
2 1 equemene
.SH NAME
3 1 equemene
HPL_perm \- Combine 2 index arrays - Generate the permutation.
4 1 equemene
.SH SYNOPSIS
5 1 equemene
\fB\&#include "hpl.h"\fR
6 1 equemene
7 1 equemene
\fB\&void\fR
8 1 equemene
\fB\&HPL_perm(\fR
9 1 equemene
\fB\&const int\fR
10 1 equemene
\fI\&N\fR,
11 1 equemene
\fB\&int *\fR
12 1 equemene
\fI\&LINDXA\fR,
13 1 equemene
\fB\&int *\fR
14 1 equemene
\fI\&LINDXAU\fR,
15 1 equemene
\fB\&int *\fR
16 1 equemene
\fI\&IWORK\fR
17 1 equemene
\fB\&);\fR
18 1 equemene
.SH DESCRIPTION
19 1 equemene
\fB\&HPL_perm\fR
20 1 equemene
combines  two  index  arrays  and generate the corresponding
21 1 equemene
permutation. First, this function computes the inverse of LINDXA, and
22 1 equemene
then combine it with LINDXAU.  Second, in order to be able to perform
23 1 equemene
the permutation in place,  LINDXAU  is overwritten by the sequence of
24 1 equemene
permutation  producing  the  same result.  What we ultimately want to
25 1 equemene
achieve is:  U[LINDXAU[i]] := U[LINDXA[i]] for i in [0..N). After the
26 1 equemene
call to this function,  this in place permutation can be performed by
27 1 equemene
for i in [0..N) swap U[i] with U[LINDXAU[i]].
28 1 equemene
.SH ARGUMENTS
29 1 equemene
.TP 8
30 1 equemene
N       (global input)          const int
31 1 equemene
On entry,  N  specifies the length of the arrays  LINDXA  and
32 1 equemene
LINDXAU. N should be at least zero.
33 1 equemene
.TP 8
34 1 equemene
LINDXA  (global input/output)   int *
35 1 equemene
On entry,  LINDXA  is an array of dimension N  containing the
36 1 equemene
source indexes. On exit,  LINDXA  contains the combined index
37 1 equemene
array.
38 1 equemene
.TP 8
39 1 equemene
LINDXAU (global input/output)   int *
40 1 equemene
On entry,  LINDXAU is an array of dimension N  containing the
41 1 equemene
target indexes.  On exit,  LINDXAU  contains  the sequence of
42 1 equemene
permutation,  that  should be applied  in increasing order to
43 1 equemene
permute the underlying array U in place.
44 1 equemene
.TP 8
45 1 equemene
IWORK   (workspace)             int *
46 1 equemene
On entry, IWORK is a workarray of dimension N.
47 1 equemene
.SH SEE ALSO
48 1 equemene
.BR HPL_plindx1 \ (3),
49 1 equemene
.BR HPL_pdlaswp01N \ (3),
50 1 equemene
.BR HPL_pdlaswp01T \ (3).