LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
subroutine dpptrs ( character  UPLO,
integer  N,
integer  NRHS,
double precision, dimension( * )  AP,
double precision, dimension( ldb, * )  B,
integer  LDB,
integer  INFO 
)

DPPTRS

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

Purpose:
 DPPTRS solves a system of linear equations A*X = B with a symmetric
 positive definite matrix A in packed storage using the Cholesky
 factorization A = U**T*U or A = L*L**T computed by DPPTRF.
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 DOUBLE PRECISION array, dimension (N*(N+1)/2)
          The triangular factor U or L from the Cholesky factorization
          A = U**T*U or A = L*L**T, 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 DOUBLE PRECISION 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 dpptrs.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  DOUBLE PRECISION 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 dtpsv, xerbla
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( 'DPPTRS', -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**T * U.
168 *
169  DO 10 i = 1, nrhs
170 *
171 * Solve U**T *X = B, overwriting B with X.
172 *
173  CALL dtpsv( 'Upper', 'Transpose', 'Non-unit', n, ap,
174  $ b( 1, i ), 1 )
175 *
176 * Solve U*X = B, overwriting B with X.
177 *
178  CALL dtpsv( '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**T.
184 *
185  DO 20 i = 1, nrhs
186 *
187 * Solve L*Y = B, overwriting B with X.
188 *
189  CALL dtpsv( 'Lower', 'No transpose', 'Non-unit', n, ap,
190  $ b( 1, i ), 1 )
191 *
192 * Solve L**T *X = Y, overwriting B with X.
193 *
194  CALL dtpsv( 'Lower', 'Transpose', 'Non-unit', n, ap,
195  $ b( 1, i ), 1 )
196  20 CONTINUE
197  END IF
198 *
199  RETURN
200 *
201 * End of DPPTRS
202 *
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
subroutine dtpsv(UPLO, TRANS, DIAG, N, AP, X, INCX)
DTPSV
Definition: dtpsv.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: