Diff for /rpl/lapack/lapack/zsptrf.f between versions 1.7 and 1.8

version 1.7, 2010/12/21 13:53:55 version 1.8, 2011/07/22 07:38:20
Line 1 Line 1
       SUBROUTINE ZSPTRF( UPLO, N, AP, IPIV, INFO )        SUBROUTINE ZSPTRF( UPLO, N, AP, IPIV, INFO )
 *  *
 *  -- LAPACK routine (version 3.2) --  *  -- LAPACK routine (version 3.3.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --  *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--  *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     November 2006  *  -- April 2011                                                      --
 *  *
 *     .. Scalar Arguments ..  *     .. Scalar Arguments ..
       CHARACTER          UPLO        CHARACTER          UPLO
Line 72 Line 72
 *  5-96 - Based on modifications by J. Lewis, Boeing Computer Services  *  5-96 - Based on modifications by J. Lewis, Boeing Computer Services
 *         Company  *         Company
 *  *
 *  If UPLO = 'U', then A = U*D*U', where  *  If UPLO = 'U', then A = U*D*U**T, where
 *     U = P(n)*U(n)* ... *P(k)U(k)* ...,  *     U = P(n)*U(n)* ... *P(k)U(k)* ...,
 *  i.e., U is a product of terms P(k)*U(k), where k decreases from n to  *  i.e., U is a product of terms P(k)*U(k), where k decreases from n to
 *  1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1  *  1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
Line 89 Line 89
 *  If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),  *  If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
 *  and A(k,k), and v overwrites A(1:k-2,k-1:k).  *  and A(k,k), and v overwrites A(1:k-2,k-1:k).
 *  *
 *  If UPLO = 'L', then A = L*D*L', where  *  If UPLO = 'L', then A = L*D*L**T, where
 *     L = P(1)*L(1)* ... *P(k)*L(k)* ...,  *     L = P(1)*L(1)* ... *P(k)*L(k)* ...,
 *  i.e., L is a product of terms P(k)*L(k), where k increases from 1 to  *  i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
 *  n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1  *  n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
Line 162 Line 162
 *  *
       IF( UPPER ) THEN        IF( UPPER ) THEN
 *  *
 *        Factorize A as U*D*U' using the upper triangle of A  *        Factorize A as U*D*U**T using the upper triangle of A
 *  *
 *        K is the main loop index, decreasing from N to 1 in steps of  *        K is the main loop index, decreasing from N to 1 in steps of
 *        1 or 2  *        1 or 2
Line 208 Line 208
                KP = K                 KP = K
             ELSE              ELSE
 *  *
 *              JMAX is the column-index of the largest off-diagonal  
 *              element in row IMAX, and ROWMAX is its absolute value  
 *  
                ROWMAX = ZERO                 ROWMAX = ZERO
                JMAX = IMAX                 JMAX = IMAX
                KX = IMAX*( IMAX+1 ) / 2 + IMAX                 KX = IMAX*( IMAX+1 ) / 2 + IMAX
Line 286 Line 283
 *  *
 *              Perform a rank-1 update of A(1:k-1,1:k-1) as  *              Perform a rank-1 update of A(1:k-1,1:k-1) as
 *  *
 *              A := A - U(k)*D(k)*U(k)' = A - W(k)*1/D(k)*W(k)'  *              A := A - U(k)*D(k)*U(k)**T = A - W(k)*1/D(k)*W(k)**T
 *  *
                R1 = CONE / AP( KC+K-1 )                 R1 = CONE / AP( KC+K-1 )
                CALL ZSPR( UPLO, K-1, -R1, AP( KC ), 1, AP )                 CALL ZSPR( UPLO, K-1, -R1, AP( KC ), 1, AP )
Line 305 Line 302
 *  *
 *              Perform a rank-2 update of A(1:k-2,1:k-2) as  *              Perform a rank-2 update of A(1:k-2,1:k-2) as
 *  *
 *              A := A - ( U(k-1) U(k) )*D(k)*( U(k-1) U(k) )'  *              A := A - ( U(k-1) U(k) )*D(k)*( U(k-1) U(k) )**T
 *                 = A - ( W(k-1) W(k) )*inv(D(k))*( W(k-1) W(k) )'  *                 = A - ( W(k-1) W(k) )*inv(D(k))*( W(k-1) W(k) )**T
 *  *
                IF( K.GT.2 ) THEN                 IF( K.GT.2 ) THEN
 *  *
Line 351 Line 348
 *  *
       ELSE        ELSE
 *  *
 *        Factorize A as L*D*L' using the lower triangle of A  *        Factorize A as L*D*L**T using the lower triangle of A
 *  *
 *        K is the main loop index, increasing from 1 to N in steps of  *        K is the main loop index, increasing from 1 to N in steps of
 *        1 or 2  *        1 or 2
Line 479 Line 476
 *  *
 *                 Perform a rank-1 update of A(k+1:n,k+1:n) as  *                 Perform a rank-1 update of A(k+1:n,k+1:n) as
 *  *
 *                 A := A - L(k)*D(k)*L(k)' = A - W(k)*(1/D(k))*W(k)'  *                 A := A - L(k)*D(k)*L(k)**T = A - W(k)*(1/D(k))*W(k)**T
 *  *
                   R1 = CONE / AP( KC )                    R1 = CONE / AP( KC )
                   CALL ZSPR( UPLO, N-K, -R1, AP( KC+1 ), 1,                    CALL ZSPR( UPLO, N-K, -R1, AP( KC+1 ), 1,
Line 502 Line 499
 *  *
 *                 Perform a rank-2 update of A(k+2:n,k+2:n) as  *                 Perform a rank-2 update of A(k+2:n,k+2:n) as
 *  *
 *                 A := A - ( L(k) L(k+1) )*D(k)*( L(k) L(k+1) )'  *                 A := A - ( L(k) L(k+1) )*D(k)*( L(k) L(k+1) )**T
 *                    = A - ( W(k) W(k+1) )*inv(D(k))*( W(k) W(k+1) )'  *                    = A - ( W(k) W(k+1) )*inv(D(k))*( W(k) W(k+1) )**T
 *  *
 *                 where L(k) and L(k+1) are the k-th and (k+1)-th  *                 where L(k) and L(k+1) are the k-th and (k+1)-th
 *                 columns of L  *                 columns of L

Removed from v.1.7  
changed lines
  Added in v.1.8


CVSweb interface <joel.bertrand@systella.fr>