Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 12/16/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

mkl_?getrinp

Computes the inverse of an LU-factored general matrix without pivoting.

Syntax

call mkl_sgetrinp( n, a, lda, work, lwork, info )

call mkl_dgetrinp( n, a, lda, work, lwork, info )

call mkl_cgetrinp( n, a, lda, work, lwork, info )

call mkl_zgetrinp( n, a, lda, work, lwork, info )

Include Files
  • mkl.fi

Description

The routine computes the inverse inv(A) of a general matrix A. Before calling this routine, call mkl_?getrfnp to factorize A.

Input Parameters

n

INTEGER. The order of the matrix A; n 0.

a, work

REAL for mkl_sgetrinp

DOUBLE PRECISION for mkl_dgetrinp

COMPLEX for mkl_cgetrinp

DOUBLE COMPLEX for mkl_zgetrinp.

Arrays: a(lda,*), work(*).

a(lda,*) contains the factorization of the matrix A, as returned by mkl_?getrfnp: A = L*U.

The second dimension of a must be at least max(1,n).

work(*) is a workspace array of dimension at least max(1,lwork).

lda

INTEGER. The leading dimension of a; lda max(1, n).

lwork

INTEGER. The size of the work array; lworkn.

If lwork = -1, then a workspace query is assumed; the routine only calculates the optimal size of the work array, returns this value as the first entry of the work array, and no error message related to lwork is issued by xerbla.

See Application Notes below for the suggested value of lwork.

Output Parameters

a

Overwritten by the n-by-n matrix inv(A).

work(1)

If info = 0, on exit work(1) contains the minimum value of lwork required for optimum performance. Use this lwork for subsequent runs.

info

INTEGER. If info = 0, the execution is successful.

If info = -i, the i-th parameter had an illegal value.

If info = i, the i-th diagonal element of the factor U is zero, U is singular, and the inversion could not be completed.

Application Notes

The total number of floating-point operations is approximately (4/3)n3 for real flavors and (16/3)n3 for complex flavors.