LAPACK  3.5.0
LAPACK: Linear Algebra PACKage
dzasum.f File Reference

Go to the source code of this file.

Functions/Subroutines

double precision function dzasum (N, ZX, INCX)
 DZASUM More...
 

Function/Subroutine Documentation

double precision function dzasum ( integer  N,
complex*16, dimension(*)  ZX,
integer  INCX 
)

DZASUM

Purpose:
    DZASUM takes the sum of the absolute values.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011
Further Details:
     jack dongarra, 3/11/78.
     modified 3/93 to return if incx .le. 0.
     modified 12/3/93, array(1) declarations changed to array(*)

Definition at line 53 of file dzasum.f.

53 *
54 * -- Reference BLAS level1 routine (version 3.4.0) --
55 * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
56 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
57 * November 2011
58 *
59 * .. Scalar Arguments ..
60  INTEGER incx,n
61 * ..
62 * .. Array Arguments ..
63  COMPLEX*16 zx(*)
64 * ..
65 *
66 * =====================================================================
67 *
68 * .. Local Scalars ..
69  DOUBLE PRECISION stemp
70  INTEGER i,nincx
71 * ..
72 * .. External Functions ..
73  DOUBLE PRECISION dcabs1
74  EXTERNAL dcabs1
75 * ..
76  dzasum = 0.0d0
77  stemp = 0.0d0
78  IF (n.LE.0 .OR. incx.LE.0) RETURN
79  IF (incx.EQ.1) THEN
80 *
81 * code for increment equal to 1
82 *
83  DO i = 1,n
84  stemp = stemp + dcabs1(zx(i))
85  END DO
86  ELSE
87 *
88 * code for increment not equal to 1
89 *
90  nincx = n*incx
91  DO i = 1,nincx,incx
92  stemp = stemp + dcabs1(zx(i))
93  END DO
94  END IF
95  dzasum = stemp
96  RETURN
double precision function dcabs1(Z)
DCABS1
Definition: dcabs1.f:41
double precision function dzasum(N, ZX, INCX)
DZASUM
Definition: dzasum.f:53