|
NAMEHPL_pipid - Simplify the pivot vector.SYNOPSIS#include "hpl.h"void HPL_pipid( HPL_T_panel * PANEL, int * K, int * IPID ); DESCRIPTIONHPL_pipid computes an array IPID that contains the source and final destination of matrix rows resulting from the application of N interchanges as computed by the LU factorization with row partial pivoting. The array IPID is such that the row of global index IPID(i) should be mapped onto the row of global index IPID(i+1). Note that we cannot really know the length of IPID a priori. However, we know that this array is at least 2*N long, since there are N rows to swap and broadcast. The length of this array must be smaller than or equal to 4*N, since every row is swapped with at most a single distinct remote row. The algorithm constructing IPID goes as follows: Let IA be the global index of the first row to be swapped.For every row src IA + i with i in [0..N) to be swapped with row dst such that dst is given by DPIV[i]: Is row src the destination of a previous row of the current block, that is, is there k odd such that IPID(k) is equal to src ? Yes: update this destination with dst. For example, if the pivot array is (0,2)(1,1)(2,5) ... , then when we swap rows 2 and 5, we swap in fact row 0 and 5, i.e., row 0 goes to 5 and not 2 as it was thought so far ... No : add the pair (src,dst) at the end of IPID; row src has not been moved yet. Is row dst different from src the destination of a previous row of the current block, i.e., is there k odd such that IPID(k) is equal to dst ? Yes: update IPID(k) with src. For example, if the pivot array is (0,5)(1,1)(2,5) ... , then when we swap rows 2 and 5, we swap in fact row 2 and 0, i.e., row 0 goes to 2 and not 5 as it was thought so far ... No : add the pair (dst,src) at the end of IPID; row dst has not been moved yet. Note that when src is equal to dst, the pair (dst,src) should not be added to IPID in order to avoid duplicated entries in this array. During the construction of the array IPID, we make sure that the first N entries are such that IPID(k) with k odd is equal to IA+k/2. For k in [0..K/2), the row of global index IPID(2*k) should be mapped onto the row of global index IPID(2*k+1). ARGUMENTS
SEE ALSOHPL_pdlaswp00N (3), HPL_pdlaswp00T (3), HPL_pdlaswp01N (3), HPL_pdlaswp01T (3).
Visit the GSP FreeBSD Man Page Interface. |