SUBROUTINE CGESV( N, NRHS, A, LDA, IPIVOT, B, LDB, INFO) COMPLEX A(LDA,*), B(LDB,*) INTEGER N, NRHS, LDA, LDB, INFO INTEGER IPIVOT(*) SUBROUTINE CGESV_64( N, NRHS, A, LDA, IPIVOT, B, LDB, INFO) COMPLEX A(LDA,*), B(LDB,*) INTEGER*8 N, NRHS, LDA, LDB, INFO INTEGER*8 IPIVOT(*)
SUBROUTINE GESV( [N], [NRHS], A, [LDA], IPIVOT, B, [LDB], [INFO]) COMPLEX, DIMENSION(:,:) :: A, B INTEGER :: N, NRHS, LDA, LDB, INFO INTEGER, DIMENSION(:) :: IPIVOT SUBROUTINE GESV_64( [N], [NRHS], A, [LDA], IPIVOT, B, [LDB], [INFO]) COMPLEX, DIMENSION(:,:) :: A, B INTEGER(8) :: N, NRHS, LDA, LDB, INFO INTEGER(8), DIMENSION(:) :: IPIVOT
void cgesv(int n, int nrhs, complex *a, int lda, int *ipivot, complex *b, int ldb, int *info);
void cgesv_64(long n, long nrhs, complex *a, long lda, long *ipivot, complex *b, long ldb, long *info);
The LU decomposition with partial pivoting and row interchanges is used to factor A as
A = P * L * U,
where P is a permutation matrix, L is unit lower triangular, and U is upper triangular. The factored form of A is then used to solve the system of equations A * X = B.