?lapmr

Rearranges rows of a matrix as specified by a permutation vector.

Syntax

FORTRAN 77:

call slapmr( forwrd, m, n, x, ldx, k )

call dlapmr( forwrd, m, n, x, ldx, k )

call clapmr( forwrd, m, n, x, ldx, k )

call zlapmr( forwrd, m, n, x, ldx, k )

FORTRAN 95:

call lapmr( x,k[,forwrd] )

C:

lapack_int LAPACKE_<?>lapmr (int matrix_layout, lapack_logical forwrd, lapack_int m, lapack_int n, <datatype> * x, lapack_int ldx, lapack_int * k);

Include Files

  • Fortran: mkl.fi
  • C: 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.

Input Parameters

The data types are given for the Fortran interface. 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

LOGICAL.

If forwrd = .TRUE., forward permutation

If forwrd = .FALSE., backward 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 slapmr

DOUBLE PRECISION for dlapmr

COMPLEX for clapmr

DOUBLE COMPLEX for zlapmr

Array, DIMENSION (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, DIMENSION (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.

Fortran 95 Interface Notes

Routines in Fortran 95 interface have fewer arguments in the calling sequence than their FORTRAN 77 counterparts. For general conventions applied to skip redundant or reconstructible arguments, see Fortran 95 Interface Conventions.

Specific details for the routine ?lapmr interface are as follows:

x

Holds the matrix X of size (n, n).

k

Holds the vector of length m.

forwrd

Specifies the permutation. Must be '.TRUE.' or '.FALSE.'.

Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.