getri#
Functions
-
void sgetri(const INT n, f32 *restrict A, const INT lda, const INT *restrict ipiv, f32 *restrict work, const INT lwork, INT *info)#
SGETRI computes the inverse of a matrix using the LU factorization computed by SGETRF.
This method inverts U and then computes inv(A) by solving the system inv(A)*L = inv(U) for inv(A).
Parameters
innThe order of the matrix A (n >= 0).
inoutAOn entry, the factors L and U from the factorization A = P*L*U as computed by sgetrf. On exit, if info = 0, the inverse of the original matrix A. Array of dimension (lda, n).
inldaThe leading dimension of the array A (lda >= max(1,n)).
inipivThe pivot indices from sgetrf; row i was interchanged with row ipiv[i]. Array of dimension n, 0-based.
outworkWorkspace array of dimension (max(1,lwork)). On exit, if info=0, then work[0] returns the optimal lwork.
inlworkThe dimension of the array work (lwork >= max(1,n)). For optimal performance lwork >= n*nb. If lwork = -1, a workspace query is assumed.
outinfoExit status:
= 0: successful exit
< 0: if info = -i, the i-th argument had an illegal value
> 0: if info = i, U(i-1,i-1) is exactly zero; the matrix is singular and its inverse could not be computed.
void sgetri(
const INT n,
f32* restrict A,
const INT lda,
const INT* restrict ipiv,
f32* restrict work,
const INT lwork,
INT* info
);
Functions
-
void dgetri(const INT n, f64 *restrict A, const INT lda, const INT *restrict ipiv, f64 *restrict work, const INT lwork, INT *info)#
DGETRI computes the inverse of a matrix using the LU factorization computed by DGETRF.
This method inverts U and then computes inv(A) by solving the system inv(A)*L = inv(U) for inv(A).
Parameters
innThe order of the matrix A (n >= 0).
inoutAOn entry, the factors L and U from the factorization A = P*L*U as computed by dgetrf. On exit, if info = 0, the inverse of the original matrix A. Array of dimension (lda, n).
inldaThe leading dimension of the array A (lda >= max(1,n)).
inipivThe pivot indices from dgetrf; row i was interchanged with row ipiv[i]. Array of dimension n, 0-based.
outworkWorkspace array of dimension (max(1,lwork)). On exit, if info=0, then work[0] returns the optimal lwork.
inlworkThe dimension of the array work (lwork >= max(1,n)). For optimal performance lwork >= n*nb. If lwork = -1, a workspace query is assumed.
outinfoExit status:
= 0: successful exit
< 0: if info = -i, the i-th argument had an illegal value
> 0: if info = i, U(i-1,i-1) is exactly zero; the matrix is singular and its inverse could not be computed.
void dgetri(
const INT n,
f64* restrict A,
const INT lda,
const INT* restrict ipiv,
f64* restrict work,
const INT lwork,
INT* info
);
Functions
-
void cgetri(const INT n, c64 *restrict A, const INT lda, const INT *restrict ipiv, c64 *restrict work, const INT lwork, INT *info)#
CGETRI computes the inverse of a matrix using the LU factorization computed by CGETRF.
This method inverts U and then computes inv(A) by solving the system inv(A)*L = inv(U) for inv(A).
Parameters
innThe order of the matrix A (n >= 0).
inoutAOn entry, the factors L and U from the factorization A = P*L*U as computed by cgetrf. On exit, if info = 0, the inverse of the original matrix A. Array of dimension (lda, n).
inldaThe leading dimension of the array A (lda >= max(1,n)).
inipivThe pivot indices from cgetrf; row i was interchanged with row ipiv[i]. Array of dimension n, 0-based.
outworkWorkspace array of dimension (max(1,lwork)). On exit, if info=0, then work[0] returns the optimal lwork.
inlworkThe dimension of the array work (lwork >= max(1,n)). For optimal performance lwork >= n*nb. If lwork = -1, a workspace query is assumed.
outinfoExit status:
= 0: successful exit
< 0: if info = -i, the i-th argument had an illegal value
> 0: if info = i, U(i-1,i-1) is exactly zero; the matrix is singular and its inverse could not be computed.
void cgetri(
const INT n,
c64* restrict A,
const INT lda,
const INT* restrict ipiv,
c64* restrict work,
const INT lwork,
INT* info
);
Functions
-
void zgetri(const INT n, c128 *restrict A, const INT lda, const INT *restrict ipiv, c128 *restrict work, const INT lwork, INT *info)#
ZGETRI computes the inverse of a matrix using the LU factorization computed by ZGETRF.
This method inverts U and then computes inv(A) by solving the system inv(A)*L = inv(U) for inv(A).
Parameters
innThe order of the matrix A (n >= 0).
inoutAOn entry, the factors L and U from the factorization A = P*L*U as computed by zgetrf. On exit, if info = 0, the inverse of the original matrix A. Array of dimension (lda, n).
inldaThe leading dimension of the array A (lda >= max(1,n)).
inipivThe pivot indices from zgetrf; row i was interchanged with row ipiv[i]. Array of dimension n, 0-based.
outworkWorkspace array of dimension (max(1,lwork)). On exit, if info=0, then work[0] returns the optimal lwork.
inlworkThe dimension of the array work (lwork >= max(1,n)). For optimal performance lwork >= n*nb. If lwork = -1, a workspace query is assumed.
outinfoExit status:
= 0: successful exit
< 0: if info = -i, the i-th argument had an illegal value
> 0: if info = i, U(i-1,i-1) is exactly zero; the matrix is singular and its inverse could not be computed.
void zgetri(
const INT n,
c128* restrict A,
const INT lda,
const INT* restrict ipiv,
c128* restrict work,
const INT lwork,
INT* info
);