LAPACK 3.12.1
LAPACK: Linear Algebra PACKage
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages

◆ zposv()

subroutine zposv ( character uplo,
integer n,
integer nrhs,
complex*16, dimension( lda, * ) a,
integer lda,
complex*16, dimension( ldb, * ) b,
integer ldb,
integer info )

ZPOSV computes the solution to system of linear equations A * X = B for PO matrices

Download ZPOSV + dependencies [TGZ] [ZIP] [TXT]

Purpose:
!> !> ZPOSV computes the solution to a complex system of linear equations !> A * X = B, !> where A is an N-by-N Hermitian positive definite matrix and X and B !> are N-by-NRHS matrices. !> !> The Cholesky decomposition is used to factor A as !> A = U**H* U, if UPLO = 'U', or !> A = L * L**H, if UPLO = 'L', !> where U is an upper triangular matrix and L is a lower triangular !> matrix. The factored form of A is then used to solve the system of !> equations A * X = B. !>
Parameters
[in]UPLO
!> UPLO is CHARACTER*1 !> = 'U': Upper triangle of A is stored; !> = 'L': Lower triangle of A is stored. !>
[in]N
!> N is INTEGER !> The number of linear equations, i.e., the order of the !> matrix A. N >= 0. !>
[in]NRHS
!> NRHS is INTEGER !> The number of right hand sides, i.e., the number of columns !> of the matrix B. NRHS >= 0. !>
[in,out]A
!> A is COMPLEX*16 array, dimension (LDA,N) !> On entry, the Hermitian matrix A. If UPLO = 'U', the leading !> N-by-N upper triangular part of A contains the upper !> triangular part of the matrix A, and the strictly lower !> triangular part of A is not referenced. If UPLO = 'L', the !> leading N-by-N lower triangular part of A contains the lower !> triangular part of the matrix A, and the strictly upper !> triangular part of A is not referenced. !> !> On exit, if INFO = 0, the factor U or L from the Cholesky !> factorization A = U**H *U or A = L*L**H. !>
[in]LDA
!> LDA is INTEGER !> The leading dimension of the array A. LDA >= max(1,N). !>
[in,out]B
!> B is COMPLEX*16 array, dimension (LDB,NRHS) !> On entry, the N-by-NRHS right hand side matrix B. !> On exit, if INFO = 0, the N-by-NRHS solution matrix X. !>
[in]LDB
!> LDB is INTEGER !> The leading dimension of the array B. LDB >= max(1,N). !>
[out]INFO
!> INFO is INTEGER !> = 0: successful exit !> < 0: if INFO = -i, the i-th argument had an illegal value !> > 0: if INFO = i, the leading principal minor of order i !> of A is not positive, so the factorization could not !> be completed, and the solution has not been computed. !>
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.

Definition at line 127 of file zposv.f.

128*
129* -- LAPACK driver routine --
130* -- LAPACK is a software package provided by Univ. of Tennessee, --
131* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
132*
133* .. Scalar Arguments ..
134 CHARACTER UPLO
135 INTEGER INFO, LDA, LDB, N, NRHS
136* ..
137* .. Array Arguments ..
138 COMPLEX*16 A( LDA, * ), B( LDB, * )
139* ..
140*
141* =====================================================================
142*
143* .. External Functions ..
144 LOGICAL LSAME
145 EXTERNAL lsame
146* ..
147* .. External Subroutines ..
148 EXTERNAL xerbla, zpotrf, zpotrs
149* ..
150* .. Intrinsic Functions ..
151 INTRINSIC max
152* ..
153* .. Executable Statements ..
154*
155* Test the input parameters.
156*
157 info = 0
158 IF( .NOT.lsame( uplo, 'U' ) .AND.
159 $ .NOT.lsame( uplo, 'L' ) ) THEN
160 info = -1
161 ELSE IF( n.LT.0 ) THEN
162 info = -2
163 ELSE IF( nrhs.LT.0 ) THEN
164 info = -3
165 ELSE IF( lda.LT.max( 1, n ) ) THEN
166 info = -5
167 ELSE IF( ldb.LT.max( 1, n ) ) THEN
168 info = -7
169 END IF
170 IF( info.NE.0 ) THEN
171 CALL xerbla( 'ZPOSV ', -info )
172 RETURN
173 END IF
174*
175* Compute the Cholesky factorization A = U**H *U or A = L*L**H.
176*
177 CALL zpotrf( uplo, n, a, lda, info )
178 IF( info.EQ.0 ) THEN
179*
180* Solve the system A*X = B, overwriting B with X.
181*
182 CALL zpotrs( uplo, n, nrhs, a, lda, b, ldb, info )
183*
184 END IF
185 RETURN
186*
187* End of ZPOSV
188*
subroutine xerbla(srname, info)
Definition cblat2.f:3285
logical function lsame(ca, cb)
LSAME
Definition lsame.f:48
subroutine zpotrf(uplo, n, a, lda, info)
ZPOTRF
Definition zpotrf.f:105
subroutine zpotrs(uplo, n, nrhs, a, lda, b, ldb, info)
ZPOTRS
Definition zpotrs.f:108
Here is the call graph for this function:
Here is the caller graph for this function: