Annotation of rpl/lapack/lapack/dppsv.f, revision 1.16

1.9       bertrand    1: *> \brief <b> DPPSV computes the solution to system of linear equations A * X = B for OTHER matrices</b>
                      2: *
                      3: *  =========== DOCUMENTATION ===========
                      4: *
1.15      bertrand    5: * Online html documentation available at
                      6: *            http://www.netlib.org/lapack/explore-html/
1.9       bertrand    7: *
                      8: *> \htmlonly
1.15      bertrand    9: *> Download DPPSV + dependencies
                     10: *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dppsv.f">
                     11: *> [TGZ]</a>
                     12: *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dppsv.f">
                     13: *> [ZIP]</a>
                     14: *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dppsv.f">
1.9       bertrand   15: *> [TXT]</a>
1.15      bertrand   16: *> \endhtmlonly
1.9       bertrand   17: *
                     18: *  Definition:
                     19: *  ===========
                     20: *
                     21: *       SUBROUTINE DPPSV( UPLO, N, NRHS, AP, B, LDB, INFO )
1.15      bertrand   22: *
1.9       bertrand   23: *       .. Scalar Arguments ..
                     24: *       CHARACTER          UPLO
                     25: *       INTEGER            INFO, LDB, N, NRHS
                     26: *       ..
                     27: *       .. Array Arguments ..
                     28: *       DOUBLE PRECISION   AP( * ), B( LDB, * )
                     29: *       ..
1.15      bertrand   30: *
1.9       bertrand   31: *
                     32: *> \par Purpose:
                     33: *  =============
                     34: *>
                     35: *> \verbatim
                     36: *>
                     37: *> DPPSV computes the solution to a real system of linear equations
                     38: *>    A * X = B,
                     39: *> where A is an N-by-N symmetric positive definite matrix stored in
                     40: *> packed format and X and B are N-by-NRHS matrices.
                     41: *>
                     42: *> The Cholesky decomposition is used to factor A as
                     43: *>    A = U**T* U,  if UPLO = 'U', or
                     44: *>    A = L * L**T,  if UPLO = 'L',
                     45: *> where U is an upper triangular matrix and L is a lower triangular
                     46: *> matrix.  The factored form of A is then used to solve the system of
                     47: *> equations A * X = B.
                     48: *> \endverbatim
                     49: *
                     50: *  Arguments:
                     51: *  ==========
                     52: *
                     53: *> \param[in] UPLO
                     54: *> \verbatim
                     55: *>          UPLO is CHARACTER*1
                     56: *>          = 'U':  Upper triangle of A is stored;
                     57: *>          = 'L':  Lower triangle of A is stored.
                     58: *> \endverbatim
                     59: *>
                     60: *> \param[in] N
                     61: *> \verbatim
                     62: *>          N is INTEGER
                     63: *>          The number of linear equations, i.e., the order of the
                     64: *>          matrix A.  N >= 0.
                     65: *> \endverbatim
                     66: *>
                     67: *> \param[in] NRHS
                     68: *> \verbatim
                     69: *>          NRHS is INTEGER
                     70: *>          The number of right hand sides, i.e., the number of columns
                     71: *>          of the matrix B.  NRHS >= 0.
                     72: *> \endverbatim
                     73: *>
                     74: *> \param[in,out] AP
                     75: *> \verbatim
                     76: *>          AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
                     77: *>          On entry, the upper or lower triangle of the symmetric matrix
                     78: *>          A, packed columnwise in a linear array.  The j-th column of A
                     79: *>          is stored in the array AP as follows:
                     80: *>          if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
                     81: *>          if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
                     82: *>          See below for further details.
                     83: *>
                     84: *>          On exit, if INFO = 0, the factor U or L from the Cholesky
                     85: *>          factorization A = U**T*U or A = L*L**T, in the same storage
                     86: *>          format as A.
                     87: *> \endverbatim
                     88: *>
                     89: *> \param[in,out] B
                     90: *> \verbatim
                     91: *>          B is DOUBLE PRECISION array, dimension (LDB,NRHS)
                     92: *>          On entry, the N-by-NRHS right hand side matrix B.
                     93: *>          On exit, if INFO = 0, the N-by-NRHS solution matrix X.
                     94: *> \endverbatim
                     95: *>
                     96: *> \param[in] LDB
                     97: *> \verbatim
                     98: *>          LDB is INTEGER
                     99: *>          The leading dimension of the array B.  LDB >= max(1,N).
                    100: *> \endverbatim
                    101: *>
                    102: *> \param[out] INFO
                    103: *> \verbatim
                    104: *>          INFO is INTEGER
                    105: *>          = 0:  successful exit
                    106: *>          < 0:  if INFO = -i, the i-th argument had an illegal value
                    107: *>          > 0:  if INFO = i, the leading minor of order i of A is not
                    108: *>                positive definite, so the factorization could not be
                    109: *>                completed, and the solution has not been computed.
                    110: *> \endverbatim
                    111: *
                    112: *  Authors:
                    113: *  ========
                    114: *
1.15      bertrand  115: *> \author Univ. of Tennessee
                    116: *> \author Univ. of California Berkeley
                    117: *> \author Univ. of Colorado Denver
                    118: *> \author NAG Ltd.
1.9       bertrand  119: *
1.15      bertrand  120: *> \date December 2016
1.9       bertrand  121: *
                    122: *> \ingroup doubleOTHERsolve
                    123: *
                    124: *> \par Further Details:
                    125: *  =====================
                    126: *>
                    127: *> \verbatim
                    128: *>
                    129: *>  The packed storage scheme is illustrated by the following example
                    130: *>  when N = 4, UPLO = 'U':
                    131: *>
                    132: *>  Two-dimensional storage of the symmetric matrix A:
                    133: *>
                    134: *>     a11 a12 a13 a14
                    135: *>         a22 a23 a24
                    136: *>             a33 a34     (aij = conjg(aji))
                    137: *>                 a44
                    138: *>
                    139: *>  Packed storage of the upper triangle of A:
                    140: *>
                    141: *>  AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
                    142: *> \endverbatim
                    143: *>
                    144: *  =====================================================================
1.1       bertrand  145:       SUBROUTINE DPPSV( UPLO, N, NRHS, AP, B, LDB, INFO )
                    146: *
1.15      bertrand  147: *  -- LAPACK driver routine (version 3.7.0) --
1.1       bertrand  148: *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
                    149: *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
1.15      bertrand  150: *     December 2016
1.1       bertrand  151: *
                    152: *     .. Scalar Arguments ..
                    153:       CHARACTER          UPLO
                    154:       INTEGER            INFO, LDB, N, NRHS
                    155: *     ..
                    156: *     .. Array Arguments ..
                    157:       DOUBLE PRECISION   AP( * ), B( LDB, * )
                    158: *     ..
                    159: *
                    160: *  =====================================================================
                    161: *
                    162: *     .. External Functions ..
                    163:       LOGICAL            LSAME
                    164:       EXTERNAL           LSAME
                    165: *     ..
                    166: *     .. External Subroutines ..
                    167:       EXTERNAL           DPPTRF, DPPTRS, XERBLA
                    168: *     ..
                    169: *     .. Intrinsic Functions ..
                    170:       INTRINSIC          MAX
                    171: *     ..
                    172: *     .. Executable Statements ..
                    173: *
                    174: *     Test the input parameters.
                    175: *
                    176:       INFO = 0
                    177:       IF( .NOT.LSAME( UPLO, 'U' ) .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
                    178:          INFO = -1
                    179:       ELSE IF( N.LT.0 ) THEN
                    180:          INFO = -2
                    181:       ELSE IF( NRHS.LT.0 ) THEN
                    182:          INFO = -3
                    183:       ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
                    184:          INFO = -6
                    185:       END IF
                    186:       IF( INFO.NE.0 ) THEN
                    187:          CALL XERBLA( 'DPPSV ', -INFO )
                    188:          RETURN
                    189:       END IF
                    190: *
1.8       bertrand  191: *     Compute the Cholesky factorization A = U**T*U or A = L*L**T.
1.1       bertrand  192: *
                    193:       CALL DPPTRF( UPLO, N, AP, INFO )
                    194:       IF( INFO.EQ.0 ) THEN
                    195: *
                    196: *        Solve the system A*X = B, overwriting B with X.
                    197: *
                    198:          CALL DPPTRS( UPLO, N, NRHS, AP, B, LDB, INFO )
                    199: *
                    200:       END IF
                    201:       RETURN
                    202: *
                    203: *     End of DPPSV
                    204: *
                    205:       END

CVSweb interface <joel.bertrand@systella.fr>