File:  [local] / rpl / lapack / lapack / dzsum1.f
Revision 1.12: download - view: text, annotated - select for diffs - revision graph
Fri Dec 14 14:22:43 2012 UTC (11 years, 5 months ago) by bertrand
Branches: MAIN
CVS tags: rpl-4_1_16, rpl-4_1_15, rpl-4_1_14, rpl-4_1_13, rpl-4_1_12, rpl-4_1_11, HEAD
Mise à jour de lapack.

    1: *> \brief \b DZSUM1 forms the 1-norm of the complex vector using the true absolute value.
    2: *
    3: *  =========== DOCUMENTATION ===========
    4: *
    5: * Online html documentation available at 
    6: *            http://www.netlib.org/lapack/explore-html/ 
    7: *
    8: *> \htmlonly
    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"> 
   15: *> [TXT]</a>
   16: *> \endhtmlonly 
   17: *
   18: *  Definition:
   19: *  ===========
   20: *
   21: *       DOUBLE PRECISION FUNCTION DZSUM1( N, CX, INCX )
   22:    23: *       .. Scalar Arguments ..
   24: *       INTEGER            INCX, N
   25: *       ..
   26: *       .. Array Arguments ..
   27: *       COMPLEX*16         CX( * )
   28: *       ..
   29: *  
   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: *
   67: *> \author Univ. of Tennessee 
   68: *> \author Univ. of California Berkeley 
   69: *> \author Univ. of Colorado Denver 
   70: *> \author NAG Ltd. 
   71: *
   72: *> \date September 2012
   73: *
   74: *> \ingroup complex16OTHERauxiliary
   75: *
   76: *> \par Contributors:
   77: *  ==================
   78: *>
   79: *> Nick Higham for use with ZLACON.
   80: *
   81: *  =====================================================================
   82:       DOUBLE PRECISION FUNCTION DZSUM1( N, CX, INCX )
   83: *
   84: *  -- LAPACK auxiliary routine (version 3.4.2) --
   85: *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
   86: *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
   87: *     September 2012
   88: *
   89: *     .. Scalar Arguments ..
   90:       INTEGER            INCX, N
   91: *     ..
   92: *     .. Array Arguments ..
   93:       COMPLEX*16         CX( * )
   94: *     ..
   95: *
   96: *  =====================================================================
   97: *
   98: *     .. Local Scalars ..
   99:       INTEGER            I, NINCX
  100:       DOUBLE PRECISION   STEMP
  101: *     ..
  102: *     .. Intrinsic Functions ..
  103:       INTRINSIC          ABS
  104: *     ..
  105: *     .. Executable Statements ..
  106: *
  107:       DZSUM1 = 0.0D0
  108:       STEMP = 0.0D0
  109:       IF( N.LE.0 )
  110:      $   RETURN
  111:       IF( INCX.EQ.1 )
  112:      $   GO TO 20
  113: *
  114: *     CODE FOR INCREMENT NOT EQUAL TO 1
  115: *
  116:       NINCX = N*INCX
  117:       DO 10 I = 1, NINCX, INCX
  118: *
  119: *        NEXT LINE MODIFIED.
  120: *
  121:          STEMP = STEMP + ABS( CX( I ) )
  122:    10 CONTINUE
  123:       DZSUM1 = STEMP
  124:       RETURN
  125: *
  126: *     CODE FOR INCREMENT EQUAL TO 1
  127: *
  128:    20 CONTINUE
  129:       DO 30 I = 1, N
  130: *
  131: *        NEXT LINE MODIFIED.
  132: *
  133:          STEMP = STEMP + ABS( CX( I ) )
  134:    30 CONTINUE
  135:       DZSUM1 = STEMP
  136:       RETURN
  137: *
  138: *     End of DZSUM1
  139: *
  140:       END

CVSweb interface <joel.bertrand@systella.fr>