Statistiques
| Révision :

root / man / man3 / HPL_pipid.3 @ 1

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

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