Developer Reference for Intel® oneAPI Math Kernel Library for C
p?lapiv
Applies a permutation matrix to a general distributed matrix, resulting in row or column pivoting.
Syntax
voidpslapiv ( char*direc , char*rowcol , char*pivroc , MKL_INT*m , MKL_INT*n , float*a , MKL_INT*ia , MKL_INT*ja , MKL_INT*desca , MKL_INT*ipiv , MKL_INT*ip , MKL_INT*jp , MKL_INT*descip , MKL_INT*iwork );
voidpdlapiv ( char*direc , char*rowcol , char*pivroc , MKL_INT*m , MKL_INT*n , double*a , MKL_INT*ia , MKL_INT*ja , MKL_INT*desca , MKL_INT*ipiv , MKL_INT*ip , MKL_INT*jp , MKL_INT*descip , MKL_INT*iwork );
voidpclapiv ( char*direc , char*rowcol , char*pivroc , MKL_INT*m , MKL_INT*n , MKL_Complex8*a , MKL_INT*ia , MKL_INT*ja , MKL_INT*desca , MKL_INT*ipiv , MKL_INT*ip , MKL_INT*jp , MKL_INT*descip , MKL_INT*iwork );
voidpzlapiv ( char*direc , char*rowcol , char*pivroc , MKL_INT*m , MKL_INT*n , MKL_Complex16*a , MKL_INT*ia , MKL_INT*ja , MKL_INT*desca , MKL_INT*ipiv , MKL_INT*ip , MKL_INT*jp , MKL_INT*descip , MKL_INT*iwork );
Include Files
mkl_scalapack.h
Description
pslapiv pdlapiv pclapiv pzlapiv The p?lapiv routine function applies either P (permutation matrix indicated by ipiv ) or inv( P ) to a general m -by- n distributed matrix sub (A) = A(ia:ia+m-1 , ja:ja+n-1) , resulting in row or column pivoting. The pivot vector may be distributed across a process row or a column. The pivot vector should be aligned with the distributed matrix A . This routine function will transpose the pivot vector, if necessary.
For example, if the row pivots should be applied to the columns of sub( A ), pass rowcol='C' and pivroc='C' .
Input Parameters
direc
(global)
Specifies in which order the permutation is applied: = ‘F’ (Forward): Applies pivots forward from top of matrix. Computes P*sub(A) . = ‘B’ (Backward): Applies pivots backward from bottom of matrix. Computes inv(P)*sub(A) .
rowcol
(global)
Specifies if the rows or columns are to be permuted: = ‘R’ : Rows will be permuted, = ‘C’ : Columns will be permuted.
pivroc
(global)
Specifies whether ipiv is distributed over a process row or column: = ‘R’ : ipiv is distributed over a process row, = ‘C’ : ipiv is distributed over a process column.
m
(global)
The number of rows in the distributed matrix sub( A ). When m = 0 , p?lapiv is set to zero. m ≥ 0 .
n
(global)
The number of columns in the distributed matrix sub( A ). When n = 0 , p?lapiv is set to zero. n ≥ 0.
- a
-
(local). REAL for pslapiv DOUBLE PRECISION for pdlapiv COMPLEX for pclapiv COMPLEX*16 for pzlapiv .
Pointer into the local memory to an array of size (lld_a, LOCc(ja+n-1))lld_a * LOCc(ja+n-1) containing the local pieces of the distributed matrix sub( A ).
ia , ja
(global)
The row and column indices in the global matrix A indicating the first row and the first column of the matrix sub( A ), respectively.
desca
(global and local) array of size dlen_ . The array descriptor for the distributed matrix A.
ipiv
(local)
Array of size lipiv ; when rowcol='R' or ‘r’ : lipiv≥LOCr(ia+m-1) + mb_a if pivroc='C' or ‘c’ , lipiv≥LOCc(m + mod(jp-1, nb_p)) if pivroc='R' or ‘r’ , and, when rowcol='C' or ‘c’ : lipiv≥LOCr(n + mod(ip-1, mb_p)) if pivroc='C' or ‘c’ , lipiv≥LOCc(ja+n-1) + nb_a if pivroc='R' or ‘r’ . This array contains the pivoting information. ipiv(i) is the global row (column), local row (column) i was swapped with. When rowcol='R' or ‘r’ and pivroc='C' or ‘c’ , or rowcol='C' or ‘c’ and pivroc='R' or ‘r’ , the last piece of this array of size mb_a (resp. nb_a ) is used as workspace. In those cases, this array is tied to the distributed matrix A .
ip , jp
(global) The row and column indices in the global matrix P indicating the first row and the first column of the matrix sub( P ), respectively.
descip
(global and local) array of size dlen_ . The array descriptor for the distributed vector ipiv .
iwork
(local).
Array of size ldw , where ldw is equal to the workspace necessary for transposition, and the storage of the transposed ipiv : Let lcm be the least common multiple of nprow and npcol .
Output Parameters
- a
-
(local). On exit, the local pieces of the permuted distributed submatrix.