File:  [local] / rpl / lapack / blas / dzasum.f
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Jan 26 15:22:45 2010 UTC (14 years, 3 months ago) by bertrand
Branches: JKB
CVS tags: start, rpl-4_0_14, rpl-4_0_13, rpl-4_0_12, rpl-4_0_11, rpl-4_0_10


Commit initial.

    1:       DOUBLE PRECISION FUNCTION DZASUM(N,ZX,INCX)
    2: *     .. Scalar Arguments ..
    3:       INTEGER INCX,N
    4: *     ..
    5: *     .. Array Arguments ..
    6:       DOUBLE COMPLEX ZX(*)
    7: *     ..
    8: *
    9: *  Purpose
   10: *  =======
   11: *
   12: *     DZASUM takes the sum of the absolute values.
   13: *
   14: *  Further Details
   15: *  ===============
   16: *
   17: *     jack dongarra, 3/11/78.
   18: *     modified 3/93 to return if incx .le. 0.
   19: *     modified 12/3/93, array(1) declarations changed to array(*)
   20: *
   21: *  =====================================================================
   22: *
   23: *     .. Local Scalars ..
   24:       DOUBLE PRECISION STEMP
   25:       INTEGER I,IX
   26: *     ..
   27: *     .. External Functions ..
   28:       DOUBLE PRECISION DCABS1
   29:       EXTERNAL DCABS1
   30: *     ..
   31:       DZASUM = 0.0d0
   32:       STEMP = 0.0d0
   33:       IF (N.LE.0 .OR. INCX.LE.0) RETURN
   34:       IF (INCX.EQ.1) GO TO 20
   35: *
   36: *        code for increment not equal to 1
   37: *
   38:       IX = 1
   39:       DO 10 I = 1,N
   40:           STEMP = STEMP + DCABS1(ZX(IX))
   41:           IX = IX + INCX
   42:    10 CONTINUE
   43:       DZASUM = STEMP
   44:       RETURN
   45: *
   46: *        code for increment equal to 1
   47: *
   48:    20 DO 30 I = 1,N
   49:           STEMP = STEMP + DCABS1(ZX(I))
   50:    30 CONTINUE
   51:       DZASUM = STEMP
   52:       RETURN
   53:       END

CVSweb interface <joel.bertrand@systella.fr>