Developer Reference for Intel® oneAPI Math Kernel Library for C
?lapmr
Rearranges rows of a matrix as specified by a permutation vector.
Syntax
lapack_intLAPACKE_slapmr ( intmatrix_layout , lapack_logicalforwrd , lapack_intm , lapack_intn , float*x , lapack_intldx , lapack_int*k );
lapack_intLAPACKE_dlapmr ( intmatrix_layout , lapack_logicalforwrd , lapack_intm , lapack_intn , double*x , lapack_intldx , lapack_int*k );
lapack_intLAPACKE_clapmr ( intmatrix_layout , lapack_logicalforwrd , lapack_intm , lapack_intn , lapack_complex_float*x , lapack_intldx , lapack_int*k );
lapack_intLAPACKE_zlapmr ( intmatrix_layout , lapack_logicalforwrd , lapack_intm , lapack_intn , lapack_complex_double*x , lapack_intldx , 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(1),k(2),...,k(m) of the integers 1,...,m .
If forwrd = .TRUE. , forward permutation:
X(k(i,*)) is moved to X(i,*) for i= 1,2,...,m .
If forwrd = .FALSE. , backward permutation:
X(i,*) is moved to X(k(i,*)) for i = 1,2,...,m .
The ?lapmr routine rearranges the rows of the m -by- n matrix X as specified by the permutation k[0], k[1], ... , k[m-1] of the integers 1,...,m .
If forwrd is true, forward permutation:
X(k[i-1],:) is moved to X{i,:) for i= 1,2,...,m .
If forwrd is false, backward permutation:
X{i,:) is moved to X(k[i-1,:) for 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
If forwrd= .TRUE. is true , forward permutation.
If forwrd= .FALSE. is false , 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 slapmr DOUBLE PRECISION for dlapmr COMPLEX for clapmr DOUBLE COMPLEX for zlapmr
Array, size at least max(1, ldx*n) for column major and max(1, ldx*m) for row major layout. On entry, the m -by- n matrix X .
ldx
The leading dimension of the array X , ldx ≥ max(1, m ) for column major layout and ldx ≥ max(1, n ) for row major layout .
k
Array, size ( m ). 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.
Return Values
This function returns a value info .
If info = 0 , the execution is successful.
If info = -i , the i -th parameter had an illegal value.
If info = -1011 , memory allocation error occurred.
LAPACK 95 Interface Notes
There exist FORTRAN 77 and FORTRAN 95 interfaces for this routine. See the Intel® oneMKL Fortran Developer Reference for details.