File:  [local] / rpl / lapack / blas / dzasum.f
Revision 1.17: download - view: text, annotated - select for diffs - revision graph
Mon Aug 7 08:38:44 2023 UTC (8 months, 3 weeks ago) by bertrand
Branches: MAIN
CVS tags: rpl-4_1_35, rpl-4_1_34, HEAD
Première mise à jour de lapack et blas.

    1: *> \brief \b DZASUM
    2: *
    3: *  =========== DOCUMENTATION ===========
    4: *
    5: * Online html documentation available at
    6: *            http://www.netlib.org/lapack/explore-html/
    7: *
    8: *  Definition:
    9: *  ===========
   10: *
   11: *       DOUBLE PRECISION FUNCTION DZASUM(N,ZX,INCX)
   12: *
   13: *       .. Scalar Arguments ..
   14: *       INTEGER INCX,N
   15: *       ..
   16: *       .. Array Arguments ..
   17: *       COMPLEX*16 ZX(*)
   18: *       ..
   19: *
   20: *
   21: *> \par Purpose:
   22: *  =============
   23: *>
   24: *> \verbatim
   25: *>
   26: *>    DZASUM takes the sum of the (|Re(.)| + |Im(.)|)'s of a complex vector and
   27: *>    returns a double precision result.
   28: *> \endverbatim
   29: *
   30: *  Arguments:
   31: *  ==========
   32: *
   33: *> \param[in] N
   34: *> \verbatim
   35: *>          N is INTEGER
   36: *>         number of elements in input vector(s)
   37: *> \endverbatim
   38: *>
   39: *> \param[in,out] ZX
   40: *> \verbatim
   41: *>          ZX is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
   42: *> \endverbatim
   43: *>
   44: *> \param[in] INCX
   45: *> \verbatim
   46: *>          INCX is INTEGER
   47: *>         storage spacing between elements of ZX
   48: *> \endverbatim
   49: *
   50: *  Authors:
   51: *  ========
   52: *
   53: *> \author Univ. of Tennessee
   54: *> \author Univ. of California Berkeley
   55: *> \author Univ. of Colorado Denver
   56: *> \author NAG Ltd.
   57: *
   58: *> \ingroup double_blas_level1
   59: *
   60: *> \par Further Details:
   61: *  =====================
   62: *>
   63: *> \verbatim
   64: *>
   65: *>     jack dongarra, 3/11/78.
   66: *>     modified 3/93 to return if incx .le. 0.
   67: *>     modified 12/3/93, array(1) declarations changed to array(*)
   68: *> \endverbatim
   69: *>
   70: *  =====================================================================
   71:       DOUBLE PRECISION FUNCTION DZASUM(N,ZX,INCX)
   72: *
   73: *  -- Reference BLAS level1 routine --
   74: *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
   75: *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
   76: *
   77: *     .. Scalar Arguments ..
   78:       INTEGER INCX,N
   79: *     ..
   80: *     .. Array Arguments ..
   81:       COMPLEX*16 ZX(*)
   82: *     ..
   83: *
   84: *  =====================================================================
   85: *
   86: *     .. Local Scalars ..
   87:       DOUBLE PRECISION STEMP
   88:       INTEGER I,NINCX
   89: *     ..
   90: *     .. External Functions ..
   91:       DOUBLE PRECISION DCABS1
   92:       EXTERNAL DCABS1
   93: *     ..
   94:       DZASUM = 0.0d0
   95:       STEMP = 0.0d0
   96:       IF (N.LE.0 .OR. INCX.LE.0) RETURN
   97:       IF (INCX.EQ.1) THEN
   98: *
   99: *        code for increment equal to 1
  100: *
  101:          DO I = 1,N
  102:             STEMP = STEMP + DCABS1(ZX(I))
  103:          END DO
  104:       ELSE
  105: *
  106: *        code for increment not equal to 1
  107: *
  108:          NINCX = N*INCX
  109:          DO I = 1,NINCX,INCX
  110:             STEMP = STEMP + DCABS1(ZX(I))
  111:          END DO
  112:       END IF
  113:       DZASUM = STEMP
  114:       RETURN
  115: *
  116: *     End of DZASUM
  117: *
  118:       END

CVSweb interface <joel.bertrand@systella.fr>