Developer Reference for Intel® oneAPI Math Kernel Library for Fortran
?lapmt
Performs a forward or backward permutation of the columns of a matrix.
Syntax
call slapmt(forwrd, m, n, x, ldx, k)
call dlapmt(forwrd, m, n, x, ldx, k)
call clapmt(forwrd, m, n, x, ldx, k)
call zlapmt(forwrd, m, n, x, ldx, k)
Include Files
mkl.fi
Description
The routine ?lapmt rearranges the columns of the m -by- n matrix X as specified by the permutation k(1),k(2),...,k(n) of the integers 1,...,nk[i - 1] for i = 1,...,n .
If forwrd= .TRUE.≠ 0 , forward permutation:
X(*,k(j)) is moved to X(*,j) for j=1,2,...,n .
If forwrd = 0 , backward permutation:
X(*,j) is moved to X(*,k(j)) for j = 1,2,...,n .
Input Parameters
- forwrd
-
LOGICAL . If forwrd= .TRUE.≠ 0 , forward permutation
m
INTEGER . The number of rows of the matrix X . m≥ 0 .
n
INTEGER . The number of columns of the matrix X . n≥ 0 .
- x
-
REAL for slapmt DOUBLE PRECISION for dlapmt COMPLEX for clapmt DOUBLE COMPLEX for zlapmt
Array, size ( ldx , n ) . On entry, the m -by- n matrix X .
ldx
INTEGER . The leading dimension of the array x , ldx ≥ max(1, m ).
k
INTEGER . Array, size ( n ). On entry, k contains the permutation vector and is used as internal workspace.
Output Parameters
- x
-
On exit, x contains the permuted matrix X .
- k
-
On exit, k is reset to its original value.