SUBROUTINE SGESV( N, NRHS, A, LDA, IPIVOT, B, LDB, INFO) INTEGER N, NRHS, LDA, LDB, INFO INTEGER IPIVOT(*) REAL A(LDA,*), B(LDB,*) SUBROUTINE SGESV_64( N, NRHS, A, LDA, IPIVOT, B, LDB, INFO) INTEGER*8 N, NRHS, LDA, LDB, INFO INTEGER*8 IPIVOT(*) REAL A(LDA,*), B(LDB,*)
SUBROUTINE GESV( [N], [NRHS], A, [LDA], IPIVOT, B, [LDB], [INFO]) INTEGER :: N, NRHS, LDA, LDB, INFO INTEGER, DIMENSION(:) :: IPIVOT REAL, DIMENSION(:,:) :: A, B SUBROUTINE GESV_64( [N], [NRHS], A, [LDA], IPIVOT, B, [LDB], [INFO]) INTEGER(8) :: N, NRHS, LDA, LDB, INFO INTEGER(8), DIMENSION(:) :: IPIVOT REAL, DIMENSION(:,:) :: A, B
void sgesv(int n, int nrhs, float *a, int lda, int *ipivot, float *b, int ldb, int *info);
void sgesv_64(long n, long nrhs, float *a, long lda, long *ipivot, float *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.