?lapmt
?lapmt
Performs a forward or backward permutation of the columns of a matrix.
Syntax
lapack_int
LAPACKE_slapmt
(
int
matrix_layout
,
lapack_logical
forwrd
,
lapack_int
m
,
lapack_int
n
,
float
*
x
,
lapack_int
ldx
,
lapack_int
*
k
);
lapack_int
LAPACKE_dlapmt
(
int
matrix_layout
,
lapack_logical
forwrd
,
lapack_int
m
,
lapack_int
n
,
double
*
x
,
lapack_int
ldx
,
lapack_int
*
k
);
lapack_int
LAPACKE_clapmt
(
int
matrix_layout
,
lapack_logical
forwrd
,
lapack_int
m
,
lapack_int
n
,
lapack_complex_float
*
x
,
lapack_int
ldx
,
lapack_int
*
k
);
lapack_int
LAPACKE_zlapmt
(
int
matrix_layout
,
lapack_logical
forwrd
,
lapack_int
m
,
lapack_int
n
,
lapack_complex_double
*
x
,
lapack_int
ldx
,
lapack_int
*
k
);
Include Files
- mkl.h
Description
The routine for .
?lapmt
rearranges the columns of the m
-by-n
matrix X
as specified by the permutation k
[i
- 1]i
= 1,...,n
If , forward permutation:
forwrd
≠
0X
(*,k
(j
))X
(*,j
)j
=1,2,...,n
If , backward permutation:
forwrd
= 0
X
(*,j
)X
(*,k
(j
))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
- If, forward permutationforwrd≠0If, backward permutationforwrd=0
- m
- The number of rows of the matrixX..m≥0
- n
- The number of columns of the matrixX..n≥0
- x
- Array, size. On entry, theldx*nm-by-nmatrixX.
- ldx
- The leading dimension of the arrayx,ldx≥max(1,m).
- k
- Array, size (n). On entry,kcontains the permutation vector and is used as internal workspace.
Output Parameters
- x
- On exit,xcontains the permuted matrixX.
- k
- On exit,kis reset to its original value.