?getf2
?getf2
Computes the LU factorization of a general m-by-n matrix using partial pivoting with row interchanges (unblocked algorithm).
Syntax
lapack_int
LAPACKE_sgetf2
(
int
matrix_layout
,
lapack_int
m
,
lapack_int
n
,
float
*
a
,
lapack_int
lda
,
lapack_int
*
ipiv
);
lapack_int
LAPACKE_dgetf2
(
int
matrix_layout
,
lapack_int
m
,
lapack_int
n
,
double
*
a
,
lapack_int
lda
,
lapack_int
*
ipiv
);
lapack_int
LAPACKE_cgetf2
(
int
matrix_layout
,
lapack_int
m
,
lapack_int
n
,
lapack_complex_float
*
a
,
lapack_int
lda
,
lapack_int
*
ipiv
);
lapack_int
LAPACKE_zgetf2
(
int
matrix_layout
,
lapack_int
m
,
lapack_int
n
,
lapack_complex_double
*
a
,
lapack_int
lda
,
lapack_int
*
ipiv
);
Include Files
- mkl.h
Description
The routine computes the
LU
factorization of a general m
-by-n
matrix A
using partial pivoting with row interchanges. The factorization has the formA
= P
*L
*U
where ) and ).
p
is a permutation matrix, L
is lower triangular with unit diagonal elements (lower trapezoidal if m
> n
U
is upper triangular (upper trapezoidal if m
< n
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.
- m
- The number of rows in the matrixA().m≥0
- n
- The number of columns inA().n≥0
- a
- Array, size at leastmax(1,for column major andlda*n)max(1,for row major layout. Arraylda*m)acontains them-by-nmatrixA.
- lda
- The leading dimension ofa; at least max(1,m)for column major layout and max(1,.n) for row major layout
Output Parameters
- a
- Overwritten byLandU. The unit diagonal elements ofLare not stored.
- ipiv
- Array, size at leastmax(1,min(.m,n))The pivot indices: for1 ≤ i ≤, rowniwas interchanged with rowipiv(i).
Return Values
This function returns a value
info
.If , the
info
= -i
i
-th parameter had an illegal value. If , is 0. The factorization has been completed, but
info
= i
>0u
i
i
U
is exactly singular. Division by 0 will occur if you use the factor U
for solving a system of linear equations.If
, memory allocation error occurred.info
= -1011