root / www / HPL_perm.html
Historique | Voir | Annoter | Télécharger (2,08 ko)
1 |
<HTML>
|
---|---|
2 |
<HEAD>
|
3 |
<TITLE>HPL_perm HPL 2.0 Library Functions September 10, 2008</TITLE> |
4 |
</HEAD>
|
5 |
|
6 |
<BODY BGCOLOR="WHITE" TEXT = "#000000" LINK = "#0000ff" VLINK = "#000099" |
7 |
ALINK = "#ffff00"> |
8 |
|
9 |
<H1>Name</H1> |
10 |
<B>HPL_perm</B> Combine 2 index arrays - Generate the permutation. |
11 |
|
12 |
<H1>Synopsis</H1> |
13 |
<CODE>#include "hpl.h"</CODE><BR><BR> |
14 |
<CODE>void</CODE> |
15 |
<CODE>HPL_perm(</CODE> |
16 |
<CODE>const int</CODE> |
17 |
<CODE>N</CODE>, |
18 |
<CODE>int *</CODE> |
19 |
<CODE>LINDXA</CODE>, |
20 |
<CODE>int *</CODE> |
21 |
<CODE>LINDXAU</CODE>, |
22 |
<CODE>int *</CODE> |
23 |
<CODE>IWORK</CODE> |
24 |
<CODE>);</CODE> |
25 |
|
26 |
<H1>Description</H1> |
27 |
<B>HPL_perm</B> |
28 |
combines two index arrays and generate the corresponding |
29 |
permutation. First, this function computes the inverse of LINDXA, and |
30 |
then combine it with LINDXAU. Second, in order to be able to perform |
31 |
the permutation in place, LINDXAU is overwritten by the sequence of |
32 |
permutation producing the same result. What we ultimately want to |
33 |
achieve is: U[LINDXAU[i]] := U[LINDXA[i]] for i in [0..N). After the |
34 |
call to this function, this in place permutation can be performed by |
35 |
for i in [0..N) swap U[i] with U[LINDXAU[i]]. |
36 |
|
37 |
<H1>Arguments</H1> |
38 |
<PRE>
|
39 |
N (global input) const int |
40 |
On entry, N specifies the length of the arrays LINDXA and |
41 |
LINDXAU. N should be at least zero. |
42 |
</PRE>
|
43 |
<PRE>
|
44 |
LINDXA (global input/output) int * |
45 |
On entry, LINDXA is an array of dimension N containing the |
46 |
source indexes. On exit, LINDXA contains the combined index |
47 |
array. |
48 |
</PRE>
|
49 |
<PRE>
|
50 |
LINDXAU (global input/output) int * |
51 |
On entry, LINDXAU is an array of dimension N containing the |
52 |
target indexes. On exit, LINDXAU contains the sequence of |
53 |
permutation, that should be applied in increasing order to |
54 |
permute the underlying array U in place. |
55 |
</PRE>
|
56 |
<PRE>
|
57 |
IWORK (workspace) int * |
58 |
On entry, IWORK is a workarray of dimension N. |
59 |
</PRE>
|
60 |
|
61 |
<H1>See Also</H1> |
62 |
<A HREF="HPL_plindx1.html">HPL_plindx1</A>, |
63 |
<A HREF="HPL_pdlaswp01N.html">HPL_pdlaswp01N</A>, |
64 |
<A HREF="HPL_pdlaswp01T.html">HPL_pdlaswp01T</A>. |
65 |
|
66 |
</BODY>
|
67 |
</HTML>
|