root / www / HPL_pipid.html
Historique | Voir | Annoter | Télécharger (3,59 ko)
1 |
<HTML>
|
---|---|
2 |
<HEAD>
|
3 |
<TITLE>HPL_pipid 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_pipid</B> Simplify the pivot vector. |
11 |
|
12 |
<H1>Synopsis</H1> |
13 |
<CODE>#include "hpl.h"</CODE><BR><BR> |
14 |
<CODE>void</CODE> |
15 |
<CODE>HPL_pipid(</CODE> |
16 |
<CODE>HPL_T_panel *</CODE> |
17 |
<CODE>PANEL</CODE>, |
18 |
<CODE>int *</CODE> |
19 |
<CODE>K</CODE>, |
20 |
<CODE>int *</CODE> |
21 |
<CODE>IPID</CODE> |
22 |
<CODE>);</CODE> |
23 |
|
24 |
<H1>Description</H1> |
25 |
<B>HPL_pipid</B> |
26 |
computes an array IPID that contains the source and final |
27 |
destination of matrix rows resulting from the application of N |
28 |
interchanges as computed by the LU factorization with row partial |
29 |
pivoting. The array IPID is such that the row of global index IPID(i) |
30 |
should be mapped onto the row of global index IPID(i+1). Note that we |
31 |
cannot really know the length of IPID a priori. However, we know that |
32 |
this array is at least 2*N long, since there are N rows to swap and |
33 |
broadcast. The length of this array must be smaller than or equal to |
34 |
4*N, since every row is swapped with at most a single distinct remote |
35 |
row. The algorithm constructing IPID goes as follows: Let IA be the |
36 |
global index of the first row to be swapped. |
37 |
|
38 |
For every row src IA + i with i in [0..N) to be swapped with row dst |
39 |
such that dst is given by DPIV[i]: |
40 |
|
41 |
Is row src the destination of a previous row of the current block, |
42 |
that is, is there k odd such that IPID(k) is equal to src ? |
43 |
Yes: update this destination with dst. For example, if the |
44 |
pivot array is (0,2)(1,1)(2,5) ... , then when we swap rows 2 and 5, |
45 |
we swap in fact row 0 and 5, i.e., row 0 goes to 5 and not 2 as it |
46 |
was thought so far ... |
47 |
No : add the pair (src,dst) at the end of IPID; row src has not |
48 |
been moved yet. |
49 |
|
50 |
Is row dst different from src the destination of a previous row of |
51 |
the current block, i.e., is there k odd such that IPID(k) is equal to |
52 |
dst ? |
53 |
Yes: update IPID(k) with src. For example, if the pivot array |
54 |
is (0,5)(1,1)(2,5) ... , then when we swap rows 2 and 5, we swap in |
55 |
fact row 2 and 0, i.e., row 0 goes to 2 and not 5 as it was thought |
56 |
so far ... |
57 |
No : add the pair (dst,src) at the end of IPID; row dst has not |
58 |
been moved yet. |
59 |
|
60 |
Note that when src is equal to dst, the pair (dst,src) should not be |
61 |
added to IPID in order to avoid duplicated entries in this array. |
62 |
During the construction of the array IPID, we make sure that the |
63 |
first N entries are such that IPID(k) with k odd is equal to IA+k/2. |
64 |
For k in [0..K/2), the row of global index IPID(2*k) should be |
65 |
mapped onto the row of global index IPID(2*k+1). |
66 |
|
67 |
<H1>Arguments</H1> |
68 |
<PRE>
|
69 |
PANEL (local input/output) HPL_T_panel * |
70 |
On entry, PANEL points to the data structure containing the |
71 |
panel information. |
72 |
</PRE>
|
73 |
<PRE>
|
74 |
K (global output) int * |
75 |
On exit, K specifies the number of entries in IPID. K is at |
76 |
least 2*N, and at most 4*N. |
77 |
</PRE>
|
78 |
<PRE>
|
79 |
IPID (global output) int * |
80 |
On entry, IPID is an array of length 4*N. On exit, the first |
81 |
K entries of that array contain the src and final destination |
82 |
resulting from the application of the N interchanges as |
83 |
specified by DPIV. The pairs (src,dst) are contiguously |
84 |
stored and sorted so that IPID(2*i+1) is equal to IA+i with i |
85 |
in [0..N) |
86 |
</PRE>
|
87 |
|
88 |
<H1>See Also</H1> |
89 |
<A HREF="HPL_pdlaswp00N.html">HPL_pdlaswp00N</A>, |
90 |
<A HREF="HPL_pdlaswp00T.html">HPL_pdlaswp00T</A>, |
91 |
<A HREF="HPL_pdlaswp01N.html">HPL_pdlaswp01N</A>, |
92 |
<A HREF="HPL_pdlaswp01T.html">HPL_pdlaswp01T</A>. |
93 |
|
94 |
</BODY>
|
95 |
</HTML>
|