mkl_?getrfnpi
mkl_?getrfnpi
Performs LU factorization (complete or incomplete) of a general matrix without pivoting.
Syntax
lapack_int LAPACKE_mkl_sgetrfnpi
(
int
matrix_layout
,
lapack_int
m
,
lapack_int
n
,
lapack_int
nfact
,
float*
a
,
lapack_int
lda
);
lapack_int LAPACKE_mkl_dgetrfnpi
(
int
matrix_layout
,
lapack_int
m
,
lapack_int
n
,
lapack_int
nfact
,
double*
a
,
lapack_int
lda
);
lapack_int LAPACKE_mkl_cgetrfnpi
(
int
matrix_layout
,
lapack_int
m
,
lapack_int
n
,
lapack_int
nfact
,
lapack_complex_float*
a
,
lapack_int
lda
);
lapack_int LAPACKE_mkl_zgetrfnpi
(
int
matrix_layout
,
lapack_int
m
,
lapack_int
n
,
lapack_int
nfact
,
lapack_complex_double*
a
,
lapack_int
lda
);
Include Files
- mkl.h
Description
The routine computes the LU factorization of a general
m
-by-n
matrix A
without using pivoting. It supports incomplete factorization. The factorization has the form:A
= L
*U
where
L
is lower triangular with unit diagonal elements (lower trapezoidal if m
> n
) and U
is upper triangular (upper trapezoidal if m
< n
). Incomplete factorization has the form:

where
is the unfactored part of matrix
L
is lower trapezoidal with unit diagonal elements, U
is upper trapezoidal, and

A
. See the application notes section for further details.Use
?getrf
if it is possible that the matrix is not diagonal dominant.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.
- matrix_layout
- Specifies whether matrix storage layout is row major (LAPACK_ROW_MAJOR) or column major (LAPACK_COL_MAJOR).
- m
- The number of rows in matrixA;m≥0.
- n
- The number of columns in matrixA;n≥0.
- nfact
- The number of rows and columns to factor; 0≤nfact≤min(m,n). Note that ifnfact< min(m,n), incomplete factorization is performed.
- a
- Array of sizeat least. Contains the matrixlda*nfor column major layout and at leastlda*mfor row major layoutA.
- lda
- The leading dimension of arraya.lda≥max(1,m)for column major layout and.lda≥max(1,n) for row major layout
Output Parameters
- a
- Overwritten byLandU. The unit diagonal elements ofLare not stored.When incomplete factorization is specified by settingnfact< min(m,n),aalso contains the unfactored submatrix
. See the application notes section for further details.
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 is 0. The requested factorization has been completed, but
info
= i
, u
ii
U
is exactly singular. Division by 0 will occur if factorization is completed and factor U
is used for solving a system of linear equations.Application Notes
The computed
L
and U
are the exact factors of a perturbed matrix A
+ E
, with |E| ≤ c(min(m, n))ε |L||U|
where is a modest linear function of
c
(n
)n
, and ε
is the machine precision.The approximate number of floating-point operations for real flavors is
- (2/3)n3
- If=m=nnfact
- (1/3)n2(3m-n)
- Ifm>n=nfact
- (1/3)m2(3n-m)
- Ifm=nfact<n
- (2/3)n3- (n-nfact)3
- Ifm=n,nfact<min(m,n)
- (1/3)(n2(3m-n) - (n-nfact)2(3m- 2nfact-n))
- Ifm>n>nfact
- (1/3)(m2(3n-m) - (m-nfact)2(3n- 2nfact-m))
- Ifnfact<m<n
The number of operations for complex flavors is four times greater.
When incomplete factorization is specified, the first
nfact
rows and columns are factored, with the update of the remaining rows and columns of A
as follows:
If matrix
A
is represented as a block 2-by-2 matrix:
where
- A11is a square matrix of ordernfact,
- A21is an (m-nfact)-by-nfactmatrix,
- A12is annfact-by-(n-nfact) matrix, and
- A22is an (m-nfact)-by-(n-nfact) matrix.
The result is

L
1
is a lower triangular square matrix of order nfact
with unit diagonal and U
1
is an upper triangular square matrix of order nfact
. L
1
and U
1
result from LU factorization of matrix A
11
: A
11
= L
1
U
1
. L
2
is an (m
- nfact
)-by-nfact
matrix and L
2
= A
21
U
1
-1
. U
2
is an nfact
-by-(n
- nfact
) matrix and U
2
= L
1
-1
A
12
.
m
- nfact
)-by-(n
- nfact
) matrix and

A
22
- L
2
U
2
.On exit, elements of the upper triangle
replaces elements of
U
1
are stored in place of the upper triangle of block A
11
in array a
; elements of the lower triangle L
1
are stored in the lower triangle of block A
11
in array a
(unit diagonal elements are not stored). Elements of L
2
replace elements of A
21
; U
2
replaces elements of A
12
and

A
22
.