Statistiques
| Révision :

root / www / HPL_pipid.html

Historique | Voir | Annoter | Télécharger (3,59 ko)

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