Developer Reference for Intel® oneAPI Math Kernel Library for C
?lapmt
Performs a forward or backward permutation of the columns of a matrix.
Syntax
lapack_intLAPACKE_slapmt ( intmatrix_layout , lapack_logicalforwrd , lapack_intm , lapack_intn , float*x , lapack_intldx , lapack_int*k );
lapack_intLAPACKE_dlapmt ( intmatrix_layout , lapack_logicalforwrd , lapack_intm , lapack_intn , double*x , lapack_intldx , lapack_int*k );
lapack_intLAPACKE_clapmt ( intmatrix_layout , lapack_logicalforwrd , lapack_intm , lapack_intn , lapack_complex_float*x , lapack_intldx , lapack_int*k );
lapack_intLAPACKE_zlapmt ( intmatrix_layout , lapack_logicalforwrd , lapack_intm , lapack_intn , lapack_complex_double*x , lapack_intldx , lapack_int*k );
Include Files
mkl.h
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
- matrix_layout
-
Specifies whether matrix storage layout is row major ( LAPACK_ROW_MAJOR ) or column major ( LAPACK_COL_MAJOR ).
- forwrd
-
LOGICAL . If forwrd= .TRUE.≠ 0 , forward permutation
If forwrd = 0 , backward permutation
m
The number of rows of the matrix X . m≥ 0 .
n
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
The leading dimension of the array x , ldx ≥ max(1, m ).
k
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.