LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
subroutine zpptrs ( character  UPLO,
integer  N,
integer  NRHS,
complex*16, dimension( * )  AP,
complex*16, dimension( ldb, * )  B,
integer  LDB,
integer  INFO 
)

ZPPTRS

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

Purpose:
 ZPPTRS solves a system of linear equations A*X = B with a Hermitian
 positive definite matrix A in packed storage using the Cholesky
 factorization A = U**H * U or A = L * L**H computed by ZPPTRF.
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 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]AP
          AP is COMPLEX*16 array, dimension (N*(N+1)/2)
          The triangular factor U or L from the Cholesky factorization
          A = U**H * U or A = L * L**H, packed columnwise in a linear
          array.  The j-th column of U or L is stored in the array AP
          as follows:
          if UPLO = 'U', AP(i + (j-1)*j/2) = U(i,j) for 1<=i<=j;
          if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = L(i,j) for j<=i<=n.
[in,out]B
          B is COMPLEX*16 array, dimension (LDB,NRHS)
          On entry, the right hand side matrix B.
          On exit, the 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
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011

Definition at line 110 of file zpptrs.f.

110 *
111 * -- LAPACK computational routine (version 3.4.0) --
112 * -- LAPACK is a software package provided by Univ. of Tennessee, --
113 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
114 * November 2011
115 *
116 * .. Scalar Arguments ..
117  CHARACTER uplo
118  INTEGER info, ldb, n, nrhs
119 * ..
120 * .. Array Arguments ..
121  COMPLEX*16 ap( * ), b( ldb, * )
122 * ..
123 *
124 * =====================================================================
125 *
126 * .. Local Scalars ..
127  LOGICAL upper
128  INTEGER i
129 * ..
130 * .. External Functions ..
131  LOGICAL lsame
132  EXTERNAL lsame
133 * ..
134 * .. External Subroutines ..
135  EXTERNAL xerbla, ztpsv
136 * ..
137 * .. Intrinsic Functions ..
138  INTRINSIC max
139 * ..
140 * .. Executable Statements ..
141 *
142 * Test the input parameters.
143 *
144  info = 0
145  upper = lsame( uplo, 'U' )
146  IF( .NOT.upper .AND. .NOT.lsame( uplo, 'L' ) ) THEN
147  info = -1
148  ELSE IF( n.LT.0 ) THEN
149  info = -2
150  ELSE IF( nrhs.LT.0 ) THEN
151  info = -3
152  ELSE IF( ldb.LT.max( 1, n ) ) THEN
153  info = -6
154  END IF
155  IF( info.NE.0 ) THEN
156  CALL xerbla( 'ZPPTRS', -info )
157  RETURN
158  END IF
159 *
160 * Quick return if possible
161 *
162  IF( n.EQ.0 .OR. nrhs.EQ.0 )
163  $ RETURN
164 *
165  IF( upper ) THEN
166 *
167 * Solve A*X = B where A = U**H * U.
168 *
169  DO 10 i = 1, nrhs
170 *
171 * Solve U**H *X = B, overwriting B with X.
172 *
173  CALL ztpsv( 'Upper', 'Conjugate transpose', 'Non-unit', n,
174  $ ap, b( 1, i ), 1 )
175 *
176 * Solve U*X = B, overwriting B with X.
177 *
178  CALL ztpsv( 'Upper', 'No transpose', 'Non-unit', n, ap,
179  $ b( 1, i ), 1 )
180  10 CONTINUE
181  ELSE
182 *
183 * Solve A*X = B where A = L * L**H.
184 *
185  DO 20 i = 1, nrhs
186 *
187 * Solve L*Y = B, overwriting B with X.
188 *
189  CALL ztpsv( 'Lower', 'No transpose', 'Non-unit', n, ap,
190  $ b( 1, i ), 1 )
191 *
192 * Solve L**H *X = Y, overwriting B with X.
193 *
194  CALL ztpsv( 'Lower', 'Conjugate transpose', 'Non-unit', n,
195  $ ap, b( 1, i ), 1 )
196  20 CONTINUE
197  END IF
198 *
199  RETURN
200 *
201 * End of ZPPTRS
202 *
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
subroutine ztpsv(UPLO, TRANS, DIAG, N, AP, X, INCX)
ZTPSV
Definition: ztpsv.f:146
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55

Here is the call graph for this function:

Here is the caller graph for this function: