?lapmr
?lapmr
Rearranges rows of a matrix as specified by a permutation vector.
Syntax
lapack_int
LAPACKE_slapmr
(
int
matrix_layout
,
lapack_logical
forwrd
,
lapack_int
m
,
lapack_int
n
,
float
*
x
,
lapack_int
ldx
,
lapack_int
*
k
);
lapack_int
LAPACKE_dlapmr
(
int
matrix_layout
,
lapack_logical
forwrd
,
lapack_int
m
,
lapack_int
n
,
double
*
x
,
lapack_int
ldx
,
lapack_int
*
k
);
lapack_int
LAPACKE_clapmr
(
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_zlapmr
(
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
?lapmr
routine rearranges the rows of the m
-by-n
matrix X
as specified by the permutation k[0], k[1], ... , k[
of the integers m
-1] 1,...,
.m
If
forwrd
is true, forward permutation:X
(k
[i
-1],:)X
{i
,:)i
= 1,2,...,m
If is false, backward permutation:
forwrd
X
{i
,:)X
(k
[i
-1,:)i
= 1,2,...,m
Input Parameters
A
<datatype>
placeholder, if present, is used for the C interface data types in the C interface section above. See
C Interface Conventions
for the C interface principal conventions and type definitions.
- forwrd
- Ifforwrdis true, forward permutation.Ifforwrdis false, backward permutation.
- m
- The number of rows of the matrixX..m≥0
- n
- The number of columns of the matrixX..n≥0
- x
- Array, sizeat leastOn entry, themax(1,for column major andldx*n)max(1,for row major layout.ldx*m)m-by-nmatrixX.
- ldx
- The leading dimension of the arrayX,ldx≥max(1,m)for column major layout and.ldx≥max(1,n) for row major layout
- k
- Array, size (m). 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.
Return Values
This function returns a value
info
.If , the execution is successful.
info
= 0If , the
info
= -i
i
-th parameter had an illegal value.If
, memory allocation error occurred.info
= -1011