Developer Reference for Intel® oneAPI Math Kernel Library for C
p?laswp
Performs a series of row interchanges on a general rectangular matrix.
Syntax
voidpslaswp ( char*direc , char*rowcol , MKL_INT*n , float*a , MKL_INT*ia , MKL_INT*ja , MKL_INT*desca , MKL_INT*k1 , MKL_INT*k2 , MKL_INT*ipiv );
voidpdlaswp ( char*direc , char*rowcol , MKL_INT*n , double*a , MKL_INT*ia , MKL_INT*ja , MKL_INT*desca , MKL_INT*k1 , MKL_INT*k2 , MKL_INT*ipiv );
voidpclaswp ( char*direc , char*rowcol , MKL_INT*n , MKL_Complex8*a , MKL_INT*ia , MKL_INT*ja , MKL_INT*desca , MKL_INT*k1 , MKL_INT*k2 , MKL_INT*ipiv );
voidpzlaswp ( char*direc , char*rowcol , MKL_INT*n , MKL_Complex16*a , MKL_INT*ia , MKL_INT*ja , MKL_INT*desca , MKL_INT*k1 , MKL_INT*k2 , MKL_INT*ipiv );
Include Files
mkl_scalapack.h
Description
pslaswp pdlaswp pclaswp pzlaswp The p?laswp routine function performs a series of row or column interchanges on the distributed matrix sub(A)=A(ia:ia+n-1, ja:ja+n-1) . One interchange is initiated for each of rows or columns k1 through k2 of sub( A ). This routine function assumes that the pivoting information has already been broadcast along the process row or column. Also note that this routine function will only work for k1-k2 being in the same mb (or nb ) block. If you want to pivot a full matrix, use p?lapiv (Applies a permutation matrix to a general distributed matrix, resulting in row or column pivoting.) .
Input Parameters
direc
(global)
Specifies in which order the permutation is applied: = ‘F’ - forward, = ‘B’ - backward.
rowcol
(global)
Specifies if the rows or columns are permuted: = ‘R’ - rows, = ‘C’ - columns.
n
(global)
If rowcol='R' , the length of the rows of the distributed matrix A(*, ja:ja+n-1) to be permuted; If rowcol='C' , the length of the columns of the distributed matrix A(ia:ia+n-1 , *) to be permuted;
- a
-
(local) REAL for pslaswp DOUBLE PRECISION for pdlaswp COMPLEX for pclaswp COMPLEX*16 for pzlaswp .
Pointer into the local memory to an array of size lld_a * LOCc ( n_a ) . On entry, this array contains the local pieces of the distributed matrix to which the row/columns interchanges will be applied.
ia
(global)
The row index in the global matrix A indicating the first row of sub( A ).
ja
(global)
The column index in the global matrix A indicating the first column of sub( A ).
desca
(global and local) array of size dlen_ .
The array descriptor for the distributed matrix A .
k1
(global)
The first element of ipiv for which a row or column interchange will be done.
k2
(global)
The last element of ipiv for which a row or column interchange will be done.
- ipiv
-
(local)
Array of size LOCr(m_a)+mb_a for row pivoting and LOCr(n_a)+nb_a for column pivoting. This array is tied to the matrix A , ipiv(k)[k]=l implies rows (or columns) kk +1 and l are to be interchanged , k = 0, 1, …, size ( ipiv ) -1 .
Output Parameters
- A
-
(local) REAL for pslaswp DOUBLE PRECISION for pdlaswp COMPLEX for pclaswp COMPLEX*16 for pzlaswp . On exit, the permuted distributed matrix.