LAPACK 3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ dzasum()

double precision function dzasum ( integer  n,
complex*16, dimension(*)  zx,
integer  incx 
)

DZASUM

Purpose:
    DZASUM takes the sum of the (|Re(.)| + |Im(.)|)'s of a complex vector and
    returns a double precision result.
Parameters
[in]N
          N is INTEGER
         number of elements in input vector(s)
[in,out]ZX
          ZX is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
[in]INCX
          INCX is INTEGER
         storage spacing between elements of ZX
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
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 71 of file dzasum.f.

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*
double precision function dcabs1(z)
DCABS1
Definition dcabs1.f:47
double precision function dzasum(n, zx, incx)
DZASUM
Definition dzasum.f:72
Here is the call graph for this function:
Here is the caller graph for this function: