1
SUBROUTINE ZGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO )
3
* -- LAPACK driver routine (version 3.0) --
4
* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
5
* Courant Institute, Argonne National Lab, and Rice University
8
* -- Modified by R. Clint Whaley for ATLAS Fortran77 LAPACK interface,
11
* .. Scalar Arguments ..
12
INTEGER INFO, LDA, LDB, N, NRHS
14
* .. Array Arguments ..
16
COMPLEX*16 A( LDA, * ), B( LDB, * )
22
* ZGESV computes the solution to a complex system of linear equations
24
* where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
26
* The LU decomposition with partial pivoting and row interchanges is
29
* where P is a permutation matrix, L is unit lower triangular, and U is
30
* upper triangular. The factored form of A is then used to solve the
31
* system of equations A * X = B.
37
* The number of linear equations, i.e., the order of the
40
* NRHS (input) INTEGER
41
* The number of right hand sides, i.e., the number of columns
42
* of the matrix B. NRHS >= 0.
44
* A (input/output) COMPLEX*16 array, dimension (LDA,N)
45
* On entry, the N-by-N coefficient matrix A.
46
* On exit, the factors L and U from the factorization
47
* A = P*L*U; the unit diagonal elements of L are not stored.
50
* The leading dimension of the array A. LDA >= max(1,N).
52
* IPIV (output) INTEGER array, dimension (N)
53
* The pivot indices that define the permutation matrix P;
54
* row i of the matrix was interchanged with row IPIV(i).
56
* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
57
* On entry, the N-by-NRHS matrix of right hand side matrix B.
58
* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
61
* The leading dimension of the array B. LDB >= max(1,N).
63
* INFO (output) INTEGER
64
* = 0: successful exit
65
* < 0: if INFO = -i, the i-th argument had an illegal value
66
* > 0: if INFO = i, U(i,i) is exactly zero. The factorization
67
* has been completed, but the factor U is exactly
68
* singular, so the solution could not be computed.
70
* =====================================================================
72
* .. External Subroutines ..
73
EXTERNAL XERBLA, ATL_F77WRAP_ZGESV
75
* .. Intrinsic Functions ..
78
* .. Executable Statements ..
80
* Test the input parameters.
85
ELSE IF( NRHS.LT.0 ) THEN
87
ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
89
ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
93
CALL XERBLA( 'ZGESV ', -INFO )
97
CALL ATL_F77WRAP_ZGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO )