root / man / man3 / HPL_pipid.3 @ 1
Historique | Voir | Annoter | Télécharger (3,16 ko)
1 |
.TH HPL_pipid 3 "September 10, 2008" "HPL 2.0" "HPL Library Functions" |
---|---|
2 |
.SH NAME |
3 |
HPL_pipid \- Simplify the pivot vector. |
4 |
.SH SYNOPSIS |
5 |
\fB\&#include "hpl.h"\fR |
6 |
|
7 |
\fB\&void\fR |
8 |
\fB\&HPL_pipid(\fR |
9 |
\fB\&HPL_T_panel *\fR |
10 |
\fI\&PANEL\fR, |
11 |
\fB\&int *\fR |
12 |
\fI\&K\fR, |
13 |
\fB\&int *\fR |
14 |
\fI\&IPID\fR |
15 |
\fB\&);\fR |
16 |
.SH DESCRIPTION |
17 |
\fB\&HPL_pipid\fR |
18 |
computes an array IPID that contains the source and final |
19 |
destination of matrix rows resulting from the application of N |
20 |
interchanges as computed by the LU factorization with row partial |
21 |
pivoting. The array IPID is such that the row of global index IPID(i) |
22 |
should be mapped onto the row of global index IPID(i+1). Note that we |
23 |
cannot really know the length of IPID a priori. However, we know that |
24 |
this array is at least 2*N long, since there are N rows to swap and |
25 |
broadcast. The length of this array must be smaller than or equal to |
26 |
4*N, since every row is swapped with at most a single distinct remote |
27 |
row. The algorithm constructing IPID goes as follows: Let IA be the |
28 |
global index of the first row to be swapped. |
29 |
|
30 |
For every row src IA + i with i in [0..N) to be swapped with row dst |
31 |
such that dst is given by DPIV[i]: |
32 |
|
33 |
Is row src the destination of a previous row of the current block, |
34 |
that is, is there k odd such that IPID(k) is equal to src ? |
35 |
Yes: update this destination with dst. For example, if the |
36 |
pivot array is (0,2)(1,1)(2,5) ... , then when we swap rows 2 and 5, |
37 |
we swap in fact row 0 and 5, i.e., row 0 goes to 5 and not 2 as it |
38 |
was thought so far ... |
39 |
No : add the pair (src,dst) at the end of IPID; row src has not |
40 |
been moved yet. |
41 |
|
42 |
Is row dst different from src the destination of a previous row of |
43 |
the current block, i.e., is there k odd such that IPID(k) is equal to |
44 |
dst ? |
45 |
Yes: update IPID(k) with src. For example, if the pivot array |
46 |
is (0,5)(1,1)(2,5) ... , then when we swap rows 2 and 5, we swap in |
47 |
fact row 2 and 0, i.e., row 0 goes to 2 and not 5 as it was thought |
48 |
so far ... |
49 |
No : add the pair (dst,src) at the end of IPID; row dst has not |
50 |
been moved yet. |
51 |
|
52 |
Note that when src is equal to dst, the pair (dst,src) should not be |
53 |
added to IPID in order to avoid duplicated entries in this array. |
54 |
During the construction of the array IPID, we make sure that the |
55 |
first N entries are such that IPID(k) with k odd is equal to IA+k/2. |
56 |
For k in [0..K/2), the row of global index IPID(2*k) should be |
57 |
mapped onto the row of global index IPID(2*k+1). |
58 |
.SH ARGUMENTS |
59 |
.TP 8 |
60 |
PANEL (local input/output) HPL_T_panel * |
61 |
On entry, PANEL points to the data structure containing the |
62 |
panel information. |
63 |
.TP 8 |
64 |
K (global output) int * |
65 |
On exit, K specifies the number of entries in IPID. K is at |
66 |
least 2*N, and at most 4*N. |
67 |
.TP 8 |
68 |
IPID (global output) int * |
69 |
On entry, IPID is an array of length 4*N. On exit, the first |
70 |
K entries of that array contain the src and final destination |
71 |
resulting from the application of the N interchanges as |
72 |
specified by DPIV. The pairs (src,dst) are contiguously |
73 |
stored and sorted so that IPID(2*i+1) is equal to IA+i with i |
74 |
in [0..N) |
75 |
.SH SEE ALSO |
76 |
.BR HPL_pdlaswp00N \ (3), |
77 |
.BR HPL_pdlaswp00T \ (3), |
78 |
.BR HPL_pdlaswp01N \ (3), |
79 |
.BR HPL_pdlaswp01T \ (3). |