Developer Reference for Intel® oneAPI Math Kernel Library for C
p?lapv2
Applies a permutation to an m -by- n distributed matrix.
Syntax
void pslapv2 ( constchar*direc , constchar*rowcol , constMKL_INT*m , constMKL_INT*n , float*a , constMKL_INT*ia , constMKL_INT*ja , constMKL_INT*desca , constMKL_INT*ipiv , constMKL_INT*ip , constMKL_INT*jp , constMKL_INT*descip );
void pdlapv2 ( constchar*direc , constchar*rowcol , constMKL_INT*m , constMKL_INT*n , double*a , constMKL_INT*ia , constMKL_INT*ja , constMKL_INT*desca , constMKL_INT*ipiv , constMKL_INT*ip , constMKL_INT*jp , constMKL_INT*descip );
void pclapv2 ( constchar*direc , constchar*rowcol , constMKL_INT*m , constMKL_INT*n , MKL_Complex8*a , constMKL_INT*ia , constMKL_INT*ja , constMKL_INT*desca , constMKL_INT*ipiv , constMKL_INT*ip , constMKL_INT*jp , constMKL_INT*descip );
void pzlapv2 ( constchar*direc , constchar*rowcol , constMKL_INT*m , constMKL_INT*n , MKL_Complex16*a , constMKL_INT*ia , constMKL_INT*ja , constMKL_INT*desca , constMKL_INT*ipiv , constMKL_INT*ip , constMKL_INT*jp , constMKL_INT*descip );
Include Files
mkl_scalapack.h
Description
p?lapv2 applies either P (permutation matrix indicated by ipiv ) or inv( P ) to an m -by- n distributed matrix sub( A ) denoting A ( ia : ia + m -1, ja : ja + n -1), resulting in row or column pivoting. The pivot vector should be aligned with the distributed matrix A . For pivoting the rows of sub( A ), ipiv should be distributed along a process column and replicated over all process rows. Similarly, ipiv should be distributed along a process row and replicated over all process columns for column pivoting.
Input Parameters
- direc
-
(global) CHARACTER. 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) CHARACTER. Specifies if the rows or columns are to be permuted: = ‘R’ Rows will be permuted, = ‘C’ Columns will be permuted.
- m
-
(global) INTEGER. The number of rows to be operated on, i.e. the number of rows of the distributed submatrix sub( A ). m >= 0.
- n
-
(global) INTEGER. The number of columns to be operated on, i.e. the number of columns of the distributed submatrix sub( A ). n >= 0.
a
Pointer into local memory to an array of size (lld_a,LOCc(ja+n-1))lld_a * LOCc ( ja + n -1) .
On entry, this local array contains the local pieces of the distributed matrix sub( A ) to which the row or columns interchanges will be applied.
- ia
-
(global) INTEGER. The row index in the global array a indicating the first row of sub( A ).
- ja
-
(global) INTEGER. The column index in the global array a indicating the first column of sub( A ).
- desca
-
(global and local) INTEGER. Array of size dlen_ . The array descriptor for the distributed matrix A .
- ipiv
-
INTEGER. Array, size >= LOCr( m_a )+ mb_a if rowcol = ‘R’, LOCc( n_a )+ nb_a otherwise.
It contains the pivoting information. ipiv [ i - 1] is the global row (column), local row (column) i was swapped with. The last piece of the array of size mb_a or nb_a is used as workspace. ipiv is tied to the distributed matrix A .
- ip
-
(global) INTEGER. The global row index of ipiv , which points to the beginning of the submatrix on which to operate.
- jp
-
(global) INTEGER. The global column index of ipiv , which points to the beginning of the submatrix on which to operate.
- descip
-
(global and local) INTEGER. Array of size 8. The array descriptor for the distributed matrix ipiv .
Output Parameters
- a
-
On exit, this array contains the local pieces of the permuted distributed matrix.