3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download DPPTRS + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpptrs.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpptrs.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpptrs.f">
21 * SUBROUTINE DPPTRS( UPLO, N, NRHS, AP, B, LDB, INFO )
23 * .. Scalar Arguments ..
25 * INTEGER INFO, LDB, N, NRHS
27 * .. Array Arguments ..
28 * DOUBLE PRECISION AP( * ), B( LDB, * )
37 *> DPPTRS solves a system of linear equations A*X = B with a symmetric
38 *> positive definite matrix A in packed storage using the Cholesky
39 *> factorization A = U**T*U or A = L*L**T computed by DPPTRF.
47 *> UPLO is CHARACTER*1
48 *> = 'U': Upper triangle of A is stored;
49 *> = 'L': Lower triangle of A is stored.
55 *> The order of the matrix A. N >= 0.
61 *> The number of right hand sides, i.e., the number of columns
62 *> of the matrix B. NRHS >= 0.
67 *> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
68 *> The triangular factor U or L from the Cholesky factorization
69 *> A = U**T*U or A = L*L**T, packed columnwise in a linear
70 *> array. The j-th column of U or L is stored in the array AP
72 *> if UPLO = 'U', AP(i + (j-1)*j/2) = U(i,j) for 1<=i<=j;
73 *> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = L(i,j) for j<=i<=n.
78 *> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
79 *> On entry, the right hand side matrix B.
80 *> On exit, the solution matrix X.
86 *> The leading dimension of the array B. LDB >= max(1,N).
92 *> = 0: successful exit
93 *> < 0: if INFO = -i, the i-th argument had an illegal value
99 *> \author Univ. of Tennessee
100 *> \author Univ. of California Berkeley
101 *> \author Univ. of Colorado Denver
104 *> \date November 2011
106 *> \ingroup doubleOTHERcomputational
108 * =====================================================================
109 SUBROUTINE DPPTRS( UPLO, N, NRHS, AP, B, LDB, INFO )
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..--
116 * .. Scalar Arguments ..
118 INTEGER INFO, LDB, N, NRHS
120 * .. Array Arguments ..
121 DOUBLE PRECISION AP( * ), B( LDB, * )
124 * =====================================================================
126 * .. Local Scalars ..
130 * .. External Functions ..
134 * .. External Subroutines ..
135 EXTERNAL DTPSV, XERBLA
137 * .. Intrinsic Functions ..
140 * .. Executable Statements ..
142 * Test the input parameters.
145 UPPER = LSAME( UPLO, 'U' )
146 IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
148 ELSE IF( N.LT.0 ) THEN
150 ELSE IF( NRHS.LT.0 ) THEN
152 ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
156 CALL XERBLA( 'DPPTRS', -INFO )
160 * Quick return if possible
162 IF( N.EQ.0 .OR. NRHS.EQ.0 )
167 * Solve A*X = B where A = U**T * U.
171 * Solve U**T *X = B, overwriting B with X.
173 CALL DTPSV( 'Upper', 'Transpose', 'Non-unit', N, AP,
176 * Solve U*X = B, overwriting B with X.
178 CALL DTPSV( 'Upper', 'No transpose', 'Non-unit', N, AP,
183 * Solve A*X = B where A = L * L**T.
187 * Solve L*Y = B, overwriting B with X.
189 CALL DTPSV( 'Lower', 'No transpose', 'Non-unit', N, AP,
192 * Solve L**T *X = Y, overwriting B with X.
194 CALL DTPSV( 'Lower', 'Transpose', 'Non-unit', N, AP,