(S|D|C|Z)GESV¶
Single, double, single complex, and double complex GESV.
Description¶
Uses LU decomposition with pivoting to solve the equation:

The LU decomposition with partial pivoting is used to factor A as:

where P is a permutation matrix, L is unit lower triangular and U is upper triangular. On exit, L and U overwrite A (the unit diagonal is not stored), the locations of pivots are stored in IPIV, and the solution matrix X overwrites B.
LAPACK Interface¶
void sgesv(const qml_long *N, const qml_long *NRHS, float *A, const qml_long *LDA,
qml_long *IPIV, float *B, const qml_long *LDB, qml_long *INFO);
void dgesv(const qml_long *N, const qml_long *NRHS, double *A, const qml_long *LDA,
qml_long *IPIV, double *B, const qml_long *LDB, qml_long *INFO);
void cgesv(const qml_long *N, const qml_long *NRHS, qml_single_complex *A,
const qml_long *LDA, qml_long *IPIV, qml_single_complex *B,
const qml_long *LDB, qml_long *INFO);
void zgesv(const qml_long *N, const qml_long *NRHS, qml_double_complex *A,
const qml_long *LDA, qml_long *IPIV, qml_double_complex *B,
const qml_long *LDB, qml_long *INFO);
Arguments¶
| N | Number of linear equations, order of A |
| NRHS | Number of right hand sides, number of columns of B |
| A | Matrix of size N x N |
| LDA | Leading dimension of A |
| IPIV | Pivot indices indicating rows to interchange |
| B | Matrix of size N x NRHS, overwritten with solutions |
| LDB | Leading dimension of B |
| INFO | 0 on success, <0 for illegal arguments, >0 for singular decomposition |