Debian Codegraph @

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

raw
1 double complex function zdotu(n,zx,incx,zy,incy)
2 c
3 c forms the dot product of two vectors.
4 c jack dongarra, 3/11/78.
5 c modified 12/3/93, array(1) declarations changed to array(*)
6 c
7 double complex zx(*),zy(*),ztemp
8 integer i,incx,incy,ix,iy,n
9 ztemp = (0.0d0,0.0d0)
10 zdotu = (0.0d0,0.0d0)
11 if(n.le.0)return
12 if(incx.eq.1.and.incy.eq.1)go to 20
13 c
14 c code for unequal increments or equal increments
15 c not equal to 1
16 c
17 ix = 1
18 iy = 1
19 if(incx.lt.0)ix = (-n+1)*incx + 1
20 if(incy.lt.0)iy = (-n+1)*incy + 1
21 do 10 i = 1,n
22 ztemp = ztemp + zx(ix)*zy(iy)
23 ix = ix + incx
24 iy = iy + incy
25 10 continue
26 zdotu = ztemp
27 return
28 c
29 c code for both increments equal to 1
30 c
31 20 do 30 i = 1,n
32 ztemp = ztemp + zx(i)*zy(i)
33 30 continue
34 zdotu = ztemp
35 return
36 end