1HPL_pipid(3)                 HPL Library Functions                HPL_pipid(3)
2
3
4

NAME

6       HPL_pipid - Simplify the pivot vector.
7

SYNOPSIS

9       #include "hpl.h"
10
11       void HPL_pipid( HPL_T_panel * PANEL, int * K, int * IPID );
12

DESCRIPTION

14       HPL_pipid  computes  an array  IPID  that contains the source and final
15       destination  of  matrix rows  resulting  from  the  application   of  N
16       interchanges   as  computed by the  LU  factorization  with row partial
17       pivoting. The array IPID is such that the row of global  index  IPID(i)
18       should  be  mapped onto the row of global index IPID(i+1). Note that we
19       cannot really know the length of IPID a priori. However, we  know  that
20       this  array  is at least 2*N long,  since  there are N rows to swap and
21       broadcast. The length of this array  must be smaller than or  equal  to
22       4*N,  since  every row is swapped with at most a single distinct remote
23       row. The algorithm constructing  IPID  goes as follows: Let IA  be  the
24       global index of the first row to be swapped.
25
26       For  every  row src IA + i with i in [0..N) to be swapped with row  dst
27       such that dst is given by DPIV[i]:
28
29       Is row  src  the destination  of a previous row of the  current  block,
30       that is, is there k odd such that IPID(k) is equal to src ?
31           Yes:   update   this destination  with dst.  For  example,  if  the
32       pivot array is  (0,2)(1,1)(2,5) ... , then when we swap rows 2  and  5,
33       we  swap  in fact row 0 and 5,  i.e.,  row 0 goes to 5 and not 2  as it
34       was thought so far ...
35           No :  add  the pair (src,dst) at the end of IPID; row src  has  not
36       been moved yet.
37
38       Is  row   dst  different  from src the destination of a previous row of
39       the current block, i.e., is there k odd such that IPID(k) is  equal  to
40       dst ?
41           Yes:   update   IPID(k) with src.  For example,  if the pivot array
42       is (0,5)(1,1)(2,5) ... , then when  we swap rows  2 and 5, we  swap  in
43       fact  row  2 and 0,  i.e.,  row 0 goes to 2 and not 5 as it was thought
44       so far ...
45           No : add  the  pair (dst,src) at the end of IPID; row dst  has  not
46       been moved yet.
47
48       Note  that  when src is equal to dst, the pair (dst,src)  should not be
49       added to  IPID  in  order  to avoid duplicated entries in  this  array.
50       During   the  construction of the array  IPID,  we  make  sure that the
51       first N entries are such that IPID(k) with k odd is equal  to   IA+k/2.
52       For  k  in  [0..K/2),  the  row  of global index  IPID(2*k)  should  be
53       mapped onto the row of global index IPID(2*k+1).
54

ARGUMENTS

56       PANEL   (local input/output)    HPL_T_panel *
57               On entry,  PANEL  points to the data structure  containing  the
58               panel information.
59
60       K       (global output)         int *
61               On  exit,  K specifies the number of entries in  IPID.  K is at
62               least 2*N, and at most 4*N.
63
64       IPID    (global output)         int *
65               On entry, IPID is an array of length 4*N.  On exit, the first K
66               entries  of  that  array  contain the src and final destination
67               resulting  from  the  application of the  N   interchanges   as
68               specified  by   DPIV.  The  pairs  (src,dst)  are  contiguously
69               stored and sorted so that IPID(2*i+1) is equal to IA+i  with  i
70               in [0..N)
71

SEE ALSO

73       HPL_pdlaswp00N (3),       HPL_pdlaswp00T (3),       HPL_pdlaswp01N (3),
74       HPL_pdlaswp01T (3).
75
76
77
78HPL 2.1                        October 26, 2012                   HPL_pipid(3)
Impressum