Debian Codegraph @

Modules/ThirdParty/VNL/src/vxl/v3p/netlib/blas/dzasum.f

raw
1 double precision function dzasum(n,zx,incx)
2 c
3 c takes the sum of the absolute values.
4 c jack dongarra, 3/11/78.
5 c modified 3/93 to return if incx .le. 0.
6 c modified 12/3/93, array(1) declarations changed to array(*)
7 c
8 double complex zx(*)
9 double precision stemp,dcabs1
10 integer i,incx,ix,n
11 c
12 dzasum = 0.0d0
13 stemp = 0.0d0
14 if( n.le.0 .or. incx.le.0 )return
15 if(incx.eq.1)go to 20
16 c
17 c code for increment not equal to 1
18 c
19 ix = 1
20 do 10 i = 1,n
21 stemp = stemp + dcabs1(zx(ix))
22 ix = ix + incx
23 10 continue
24 dzasum = stemp
25 return
26 c
27 c code for increment equal to 1
28 c
29 20 do 30 i = 1,n
30 stemp = stemp + dcabs1(zx(i))
31 30 continue
32 dzasum = stemp
33 return
34 end