Annotation of rpl/lapack/lapack/dzsum1.f, revision 1.18

1.11      bertrand    1: *> \brief \b DZSUM1 forms the 1-norm of the complex vector using the true absolute value.
1.8       bertrand    2: *
                      3: *  =========== DOCUMENTATION ===========
                      4: *
1.15      bertrand    5: * Online html documentation available at
                      6: *            http://www.netlib.org/lapack/explore-html/
1.8       bertrand    7: *
                      8: *> \htmlonly
1.15      bertrand    9: *> Download DZSUM1 + dependencies
                     10: *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dzsum1.f">
                     11: *> [TGZ]</a>
                     12: *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dzsum1.f">
                     13: *> [ZIP]</a>
                     14: *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dzsum1.f">
1.8       bertrand   15: *> [TXT]</a>
1.15      bertrand   16: *> \endhtmlonly
1.8       bertrand   17: *
                     18: *  Definition:
                     19: *  ===========
                     20: *
                     21: *       DOUBLE PRECISION FUNCTION DZSUM1( N, CX, INCX )
1.15      bertrand   22: *
1.8       bertrand   23: *       .. Scalar Arguments ..
                     24: *       INTEGER            INCX, N
                     25: *       ..
                     26: *       .. Array Arguments ..
                     27: *       COMPLEX*16         CX( * )
                     28: *       ..
1.15      bertrand   29: *
1.8       bertrand   30: *
                     31: *> \par Purpose:
                     32: *  =============
                     33: *>
                     34: *> \verbatim
                     35: *>
                     36: *> DZSUM1 takes the sum of the absolute values of a complex
                     37: *> vector and returns a double precision result.
                     38: *>
                     39: *> Based on DZASUM from the Level 1 BLAS.
                     40: *> The change is to use the 'genuine' absolute value.
                     41: *> \endverbatim
                     42: *
                     43: *  Arguments:
                     44: *  ==========
                     45: *
                     46: *> \param[in] N
                     47: *> \verbatim
                     48: *>          N is INTEGER
                     49: *>          The number of elements in the vector CX.
                     50: *> \endverbatim
                     51: *>
                     52: *> \param[in] CX
                     53: *> \verbatim
                     54: *>          CX is COMPLEX*16 array, dimension (N)
                     55: *>          The vector whose elements will be summed.
                     56: *> \endverbatim
                     57: *>
                     58: *> \param[in] INCX
                     59: *> \verbatim
                     60: *>          INCX is INTEGER
                     61: *>          The spacing between successive values of CX.  INCX > 0.
                     62: *> \endverbatim
                     63: *
                     64: *  Authors:
                     65: *  ========
                     66: *
1.15      bertrand   67: *> \author Univ. of Tennessee
                     68: *> \author Univ. of California Berkeley
                     69: *> \author Univ. of Colorado Denver
                     70: *> \author NAG Ltd.
1.8       bertrand   71: *
                     72: *> \ingroup complex16OTHERauxiliary
                     73: *
                     74: *> \par Contributors:
                     75: *  ==================
                     76: *>
                     77: *> Nick Higham for use with ZLACON.
                     78: *
                     79: *  =====================================================================
1.1       bertrand   80:       DOUBLE PRECISION FUNCTION DZSUM1( N, CX, INCX )
                     81: *
1.18    ! bertrand   82: *  -- LAPACK auxiliary routine --
1.1       bertrand   83: *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
                     84: *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
                     85: *
                     86: *     .. Scalar Arguments ..
                     87:       INTEGER            INCX, N
                     88: *     ..
                     89: *     .. Array Arguments ..
                     90:       COMPLEX*16         CX( * )
                     91: *     ..
                     92: *
                     93: *  =====================================================================
                     94: *
                     95: *     .. Local Scalars ..
                     96:       INTEGER            I, NINCX
                     97:       DOUBLE PRECISION   STEMP
                     98: *     ..
                     99: *     .. Intrinsic Functions ..
                    100:       INTRINSIC          ABS
                    101: *     ..
                    102: *     .. Executable Statements ..
                    103: *
                    104:       DZSUM1 = 0.0D0
                    105:       STEMP = 0.0D0
                    106:       IF( N.LE.0 )
                    107:      $   RETURN
                    108:       IF( INCX.EQ.1 )
                    109:      $   GO TO 20
                    110: *
                    111: *     CODE FOR INCREMENT NOT EQUAL TO 1
                    112: *
                    113:       NINCX = N*INCX
                    114:       DO 10 I = 1, NINCX, INCX
                    115: *
                    116: *        NEXT LINE MODIFIED.
                    117: *
                    118:          STEMP = STEMP + ABS( CX( I ) )
                    119:    10 CONTINUE
                    120:       DZSUM1 = STEMP
                    121:       RETURN
                    122: *
                    123: *     CODE FOR INCREMENT EQUAL TO 1
                    124: *
                    125:    20 CONTINUE
                    126:       DO 30 I = 1, N
                    127: *
                    128: *        NEXT LINE MODIFIED.
                    129: *
                    130:          STEMP = STEMP + ABS( CX( I ) )
                    131:    30 CONTINUE
                    132:       DZSUM1 = STEMP
                    133:       RETURN
                    134: *
                    135: *     End of DZSUM1
                    136: *
                    137:       END

CVSweb interface <joel.bertrand@systella.fr>